Performance problem: container slower than host (x1/2)

I made test in several cases. It’s the same than the previous message: the make step of Python compilation.

There are no real difference between using the disk and using tmpfs so I guess the compilation is done in memory in each cases:

  • Debian host:
ext4 tmpfs
real 2m53 2m53
user 2m42 2m42
sys 0m 0m10
  • Debian buster container:
zfs tmpfs
real 3m01 2m59
user 2m47 2m46
sys 0m13 0m12
  • Alpinelinux container:
zfs tmpfs
real 5m13 5m13
user 4m40 4m40
sys 0m33 0m32

Commands used with tmpfs:

mkdir /tmp/stephane.tmpfs
sudo mount -t tmpfs tmpfs /tmp/stephane.tmpfs -o size=1g
cp -r Python-3.7.12 /tmp/stephane.tmpfs
cd /tmp/stephane.tmpfs
./configure
time make

For the next steps, I will:

  • measure time of sync command after the compilation
  • compare kernel scheduler as you suggest
  • search if there are known speed differences between glibc (used by Debian) and musl (used by Alpinelinux)

Do you think about these steps ?