[openstack-dev] [trove] timeouts in gate-trove-python34-db
Victor Stinner
vstinner at redhat.com
Mon May 16 14:56:40 UTC 2016
Le 16/05/2016 16:12, Peter Stachowski a écrit :
> Amrith is right though - python34 is *much* slower running this check
> (and somewhat in general) than python27. Maybe that doesn't
> translate into real-world performance data, but it has made me a bit
> nervous nonetheless.
IMHO we should look more closely to the output. See my comments on the
bug report:
https://bugs.launchpad.net/trove/+bug/1582257
Currently, running unit tests on Python 3 runs 686 tests in 15.971s,
whereas Python 2 runs 1495 tests in 22.595s. Python 3 is "faster" :-)
(16 sec < 23 sec)
The whole Python 3 job takes 10 minutes, but in these 10 minutes, almost
8 minutes are taken just to build binary wheel packages. On Python 2,
prebuilt packages are used and so creating the virtual environment is
much faster (around one minute). I proposed a change to prebuild also
wheel packages on Python 3:
https://review.openstack.org/#/c/316890/
Ok, but sometimes we get timeout, right? Again, if you look closely to
the output, between two runs on Python 2, the timing also changes a lot:
(a) Ran 1495 tests in 22.595s
(b) Ran 1495 tests in 393.364s => 17x slower!
The issue is not specific to Python 3. But it looks like the random
slowdown is much larger on Python 3. Duration of Python 3 unit tests:
(a) "Ran 686 tests in 15.971s"
(b) "Ran 686 tests in 1581.090s" => 100x slower!
I guess that the difference is that Python 3 unit tests are currently
run sequentially (1 process), whereas Python 2 unit tests are run in
parallel (8 processes).
*Again* please check the code detecting dangling mocks. For example,
"tox -e py34" takes 14 seconds without this code, 177 seconds with the
code: 12x slower with the code.
Victor
More information about the OpenStack-dev
mailing list