Fork from T236675.
I have noticed a 20% increase in execution time running Docker container on a Stretch instance compared to a Jessie instance.
That disappear on Stretch when setting the kernel boot option mitigations=off
- The benchmark is done running a python script (jenkins-job-builder) for integration/config
- The instances are on the same underlying machine (cloudvirt1028)
- There is barely any load on the server or on the instances at the time conducting the test
- Jessie has kernel 4.9.110-3+deb9u5~deb8u1
- Stretch has kernel 4.9.189-3+deb9u1
- I have ruled out nslcd vs sssd
- It is not related to the python version, they are the same in the container
- it is not glibc / libpthreads related or so. Based on comparison between perf reports
- it is not related to the Docker version
I have initially and intuitively thought about the Spectre meltdown and other CPU issues mitigations, but dismissed that early and went wasting time comparing other parameters.
Eventually, I have rebooted a machine with kernel boot option mitigations=off based on informations at https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/MDS
Result on three instances all on cloudvirt1028:
Host | OS | Kernel | Kernel option | Duration |
integration-agent-jessie-docker-1001 | Jessie | 4.9.110 | defaults | 55s (good) |
integration-agent-jessie-docker-1001 | Jessie | 4.9.189 | defaults | 55s (good) |
integration-agent-jessie-docker-1001 | Jessie | 4.9.189 | mitigations=off | 54s (good) |
integration-agent-1008-docker | Stretch | 4.9.189 | defaults | 1m6s |
integration-agent-1005-docker | Stretch | 4.9.189 | defaults | 1m7s |
integration-agent-1005-docker | Stretch | 4.9.189 | mitigations=off | 55s (good) |