Comment 4 for bug 1929126

Revision history for this message
richard wu (rwu888) wrote :

Thanks for the replies! when it runs on baremetal, it runs within milliseconds. I actually run the same code on amazonlinux:2 on docker and install the lxml, then run the test code, it returns back in 15 seconds. it has something to do with the how the docker container schedule the vCPUs.
here is how I setup,

docker run --cpuset-cpus 0-1 --cpu-period 1000000 --cpu-quota 200000 --memory 2G --memory-swap 2G --security-opt seccomp=unconfined -it --rm --entrypoint /bin/bash -v /tmp:/mnt amazonlinux:2

amazon-linux-extras enable python3.8

python3.8 -m pip install lxml

python3.8 testsxd.py

bash-4.2# python3.8 testsxd.py
XML valid, schema validation ok.
Valid! :)
finished in 15.0521 seconds