-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Processes are running slow in docker container on ubuntu 18.04 #738
Comments
Aayush did you find anything? We are starting to see something similar on latest Ubuntu 16 update with some 4.15 kernel and updated packages (could be same as ubuntu 18) |
Seems to be something in the docker engine causing this, not runc or containerd. Test with Docker:
With Containerd:
|
Hello @mbdas, I found that when I installed docker via binary. That is if I install docker from the static binaries as mentioned in this link I started getting better performance as one in ubuntu 16. But when I am installing the docker through Still, I did not get any clue for whats is the difference between installation via apt-get vs installation via static binaries. |
An engineer in the team found the issue. libseccomp2 was causing this. Once we downgraded the lib, it was back to normal. docker needs to look at what changed in this lib. |
I do have similar issue. Ubuntu 19.04. Docker version 19.03.2. |
@mbdas What is the version you have installed? |
2.2.3-3ubuntu3 . We have pinned this version for now. |
I now see a case when a simple "docker build" with a Dockerfile containing "apt-get install" for a dozen packages runs for 20 minutes before hanging completely. Just reducing that to:
Leads to:
|
* Update docs/submodules/releng from branch 'master' to 9fc7ba4d38afdd7816145b771e579b518506cc2a - Try bypassing libseccomp performance issues docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I17502628ccaa7868f0605c649f0549d9fd6f9dd2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
* Update docs/submodules/releng from branch 'master' to 9fc7ba4d38afdd7816145b771e579b518506cc2a - Try bypassing libseccomp performance issues docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I17502628ccaa7868f0605c649f0549d9fd6f9dd2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I17502628ccaa7868f0605c649f0549d9fd6f9dd2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
* Update docs/submodules/releng from branch 'master' to 9fc7ba4d38afdd7816145b771e579b518506cc2a - Try bypassing libseccomp performance issues docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I17502628ccaa7868f0605c649f0549d9fd6f9dd2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
* Update docs/submodules/releng from branch 'master' to b7322ba6abc373d8e50ef29a7c2fe25a5d736042 - Try bypassing libseccomp performance issues (OVN) docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I892fba7d96b7fc957b7368009ab56b3e0a2ee1a8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I892fba7d96b7fc957b7368009ab56b3e0a2ee1a8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
* Update docs/submodules/releng from branch 'master' to b7322ba6abc373d8e50ef29a7c2fe25a5d736042 - Try bypassing libseccomp performance issues (OVN) docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I892fba7d96b7fc957b7368009ab56b3e0a2ee1a8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
* Update docs/submodules/releng from branch 'master' to b7322ba6abc373d8e50ef29a7c2fe25a5d736042 - Try bypassing libseccomp performance issues (OVN) docker/for-linux#738 https://forums.docker.com/t/performance-issues-after-dist-upgrade-on-ubuntu-16-04lts/76998 Change-Id: I892fba7d96b7fc957b7368009ab56b3e0a2ee1a8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Same problem with Ubuntu 18 LTS (docker 19.03.8 bionic) and also after it's been updated to 20 LTS (docker 19.03.8 eoan). This only specifics about that server is it's got a mirror raid with mechanical disks. I tried to tweak the scheduler, without success. After I found this issue and this thread, I tried with |
I'm seeing the same thing in PopOS 20.04 as well - building C++ project with ninja doesn't utilize all the cores like it did when running in Ubuntu 18.04. My current docker version is 19.03.11, build 42e35e61f3 |
For reference, this slowdown in my case vanished in the same non-deterministic way as they appeared. My take-away is that Docker performance re: image building can just be non-deterministic, and not every time it's due to something was done on your side (or rather, it's not the case that you can just do something specific on your side to make it go away). |
fwiw, I don't think it's |
Has anyone found any solutions? I'm running PopOS 20.04 and docker containers run 30% slower than they should. When running a python app test suite in docker my machine is 30% slower than my colleague with same CPU running Windows/Ubuntu 18.04 in WSL. I could accept a small difference, actually I'd expect PopOS to be faster, but 30% difference doesnt quite make sense. |
I gave up and changed servers |
i can confirm that running docker on PopOS 20.04 is around 30% slower than it should. @alexphelps did you found a solution? |
I am fairly certain this is related to libseccomp. |
Relevant seccomp issue: seccomp/libseccomp#153 |
You could also try running with |
Can confirm the massive loss of performance:
With
On the Host itself:
|
Seeing the same ~3X speedup with seccomp:unconfined.. |
As noted before in the thread, only way out is downgrade libseccomp to a pretty old version and make it work and ensure it remains pinned and no OS update replaces it. I am curious if containerd (now that K8s directly uses it) or podman (from redhat end) which supports seccomp, whether they use a different lib to implement seccomp profile and hence no issue in those setups. Clearly no one in docker community is interested to resolve this. |
@mbdas As I understand it libseccomp 2.5 addresses these performance issues. |
I'd be happy to try upgrading to confirm the fix. Any guidance on how? (apt-get? fresh docker install at some version? basic googling did not make this obvious) |
… 15min. Some apparent docker problems, a-la docker/for-linux#738 Change-Id: I214f694d35dbef1205f578d816864e30113d6fd3 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
I use |
I just updated our CI server to ubuntu 20.04.2 and have noticed the same problem. A lot of our CI tests start to fail due to timeout. I checked the libseccomps version is 2.5.1-1ubuntu1~20.04.1. |
I'm also able to reproduce the problem illustrated by the two commands above. Here's my setup: |
Please make sure you are using runc version rc92 and not rc93 (latest). |
I'm not sure how I'd be able to do that considering rc92 is not an available version in apt for me, but it looks like rc94 is coming out very soon with the following, so thanks for the hint. |
Having upgraded to the latest version of runc, I'm still seeing a big discrepancy in performance between the two commands @alexgit2k gave us. The ratio of the time taken for the two commands is smaller but the time taken to run without the
|
This isn't limited to docker and I'm seeing it with the lastest containerd (1.4.6 and 1.5.2) and libseccomp (2.5.1): I've done some rough testing on a few different systems and it appears there is a 15%-50% hit in performance prior to kernel 5.11. Upgrading your kernel may help if that is an option for you. |
A soluytion other than running with http://mamememo.blogspot.com/2020/05/cpu-intensive-rubypython-code-runs.html My guess is that running with |
I get similar issue. My setup: Ubuntu 22.04.3 LTS |
I was facing a similar issue but managed to narrow down the issue in my system. Docker was unusuably slow in build, starting and stoping containers. After reverting this change everthing became several magnitudes faster. Is anyone aware why the data directory might trigger this bug? |
Yeah my guess is you were running containers under qemu because they were for the wrong platform. |
@cpuguy83 unsure if you are referring to me, but if so how would the data-dir change the target platform? I did just set the data-dir as described here: I don't have QEmu installed on my system (or is docker pulling an image for it in the background too?) |
If you run a container with a People often register qemu with binfmt_misc for non-native platforms (this is usually done with |
Processes are taking time when running them in a docker container on ubuntu 18 machine. But the same process with the same docker version is running fine on ubuntu 16 machine.
I have a node application listening on some port. Accepting get requests on the path "/" and "/docker" which simply runs a command "whoami" in the host machine and in docker container respectively and returns the result. The same node application with the same docker container is running on both the machines (ubuntu16 and ubuntu18).
Now, First I tried sending 20 concurrent get request with path "/" to both the machines. And both the machines executed the command in avg of
35-40ms. With this, I concluded that the spawning process without docker has the same behaviour.
Now, Second I tried sending 20 concurrent get request with path "/docker" to both the machines. Here, ubuntu16 machine took Max 4.3 seconds and Avg 3 seconds. But ubuntu18 machine taking Max 10seconds and Avg 9 seconds.
I tried the above test multiple times. and concluded when running processes concurrently inside docker the time taken to execute is almost double in ubuntu18 machine as compare to ubuntu16.
Output of
docker version
:Output of
docker info
which are common to both machine:Output of
docker info
which specific to ubuntu16:Output of
docker info
which specific to ubuntu18:Additional environment details (AWS, VirtualBox, physical, etc.)
docker image
The command I am running in docker
ubuntu18 machine Data:
1. Data of time taken in execution
2. logs of command
strace -t docker exec ubuntu whoami
3. result of
perf top --sort comm,dso
So, I need help in debugging what is wrong with docker on the ubuntu18 machine. Or if there is any limitation with docker on ubuntu18 or maybe some machine or docker configuration issue.
The text was updated successfully, but these errors were encountered: