skip to Main Content

I just got informed today that there was a problem that when we run a python code on a container, it will be slower than running it on the host. More details about this problem is on the following link:

https://pythonspeed.com/articles/docker-performance-overhead/

this Article is for 2021 and its solution was to run container with privilleged access or set Seccomp as unconfined which is strongly suggested no to do so security wise.
Now in 2024 I just want to see if the problem is solved or is another solution found for that?

I just got curious to know if there is a better solution for that

2

Answers


  1. Docker is not a virtualisation/emulation. The Process running inside your Docker Container runs with the same speed as if it runs directly on your computer machine. There will be a little overhead in I/O but nowadays this difference is negligible.

    Login or Signup to reply.
  2. "Now in 2024 I just want to see if the problem is solved"
    -> the answer to that is no.

    Both issues linked in the blog-post related to the performance overhead of seccomp are still open.
    https://github.com/docker-library/python/issues/575
    https://github.com/moby/moby/issues/41389

    For mitigations and explanations see here:
    Docker 50% performance hit on cpu intensive code

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search