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
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.