Unfolding Odyssey of Cognizance

Optimizing Colima for Low Resource Usage

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:

  1. VM Size: The default size is a 30GB. I kept this as it is. As I had enough free space in disk.

  2. 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.

  3. 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).

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.

#tech