If you’re a developer using Docker in Mac, there’s a good chance you’re familiar with Colima, a docker desktop replacement. Colima utilizes a Ubuntu virtual machine (VM) to facilitate Docker runtime. While convenient, the default VM settings can be resource-intensive.
I found three parameter that can improve performance:
-
VM Size: The default size is a 30GB. I kept this as it is. As I had enough free space in disk.
-
CPU: The default allocates 2 cores. If you’re primarily using containers for services like MySQL and Redis, you can likely get away with a single core.
-
Memory: The default provides 2GB, but for a scenario involving just two containers as above, allocating 750MB was sufficient in my case.
Additionally, changing below configuration can help (only for mac).
- vmType: vz
- mountType: virtiofs
Then execute colima delete
to delete existing VM and colima start
to create new one with updated configuration.
BTW I’m using MacBook Pro with Intel i7.