Closed grzegorzk closed 4 years ago
I'm inclined, but won't, to make the claim this is not about podman. Running those tests on the host and inside a container are not fair assessments of podman. You are running rootless, and therefore filesystems are at play that might explain this readily. Lets see what others have to say.
The two big potential causes I can think of:
--security-opt seccomp=unconfined
I think I would expect the performance of root Podman using kernel overlayfs with Seccomp disabled to be very similar to running outside of a container. Unfortunately, without kernel Overlay support (this is being debated in the kernel community, there are security implications), we can't guarantee that level of performance for rootless Podman. But things will probably be significantly faster if you turn off Seccomp.
maybe edit the original post with a real example for step 5 and it could be examined.
Hi @baude, I will build test package over the weekend. Simple dependencies-less package I have already built does not show this problem so I'll try to put the same dependencies.
@giuseppe FYI
I tried to build reference package and after spending some time with it I pinpointed the offending package - boto3 - which was expecting ~/.aws directory with some configuration to exist. I was too fast to jump into conclusions, doh! Apologies.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I tried to run
pytest
from within the container. It takes long time to run small number of tests (7) - to run same tests on host takes milliseconds.Steps to reproduce the issue:
podman run -it --rm ubuntu /bin/bash
apt-get update
apt-get install python3 python3-pip git
pip3 install pytest
git clone https://github.com/any_python_repo/with_tests
cd with_tests && pip3 install -e .
pytest
Describe the results you received:
It took a few seconds to collect and run tests
Describe the results you expected:
Running pytest should take same amount of time on host and on container
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):