Slow Volume mounts performance
I am in a process of validating colima for development (instead of Docker Desktop).
Using volume mounts for python environment using volume pointing to our source code. If I compare Docker Desktop mounted volume performance and colima it is a lot slower (2x slower).
docker-compose:
volumes:
- ./:/dev:cached
Running time pytest in our code (with 70k of files):
case 1: Docker for Desktop real 0m10.292s user 0m4.504s sys 0m0.768s
case 2: colima (same as before) real 0m21.650s user 0m6.904s sys 0m0.750s
case 3: colima copy all files to not mounted folder inside container real 0m5.358s user 0m5.040s sys 0m0.257s
It seems that sharing a folder from host has a significant penalty. Is it possible to optimise this? Somehow caching files in qemu?
Relevant discussion and benchmarks of volume mount options with QEMU https://github.com/NixOS/nixpkgs/pull/122420#issuecomment-1022201942