Monday, 2021-07-19

-opendevstatus- NOTICE: The maintenance of the review.opendev.org Gerrit service is now complete and service has been restored. Please alert us in #opendev if you have any issues. Thank you03:26
*** mgoddard- is now known as mgoddard06:04
*** rpittau|afk is now known as rpittau09:31
*** kopecmartin is now known as kopecmartin|pto09:45
*** sshnaidm|afk is now known as sshnaidm13:10
johnsomzzzeek Hi there. We are seeing a big speed difference between SQLAlchemy 1.3.24 and 1.4.20/21 on our functional tests that use sqlite. One test for example, 1.3.24 is 46.3184 seconds, 1.4.21 is 75.285. Would you have any tips for us?16:52
johnsomTest job output: https://zuul.opendev.org/t/openstack/build/7ad487ec5fad48a894ddb30ad58d8c6e/log/job-output.txt16:52
zzzeekjohnsom: yes, you would need to identify the specific set of SQLAlchemy functions that are behaving differently.  since it's SQLite, it's unlikely to be relaeted to SQL query consruction or concurrency, so you'd want to look into code profiling as discussed at https://docs.sqlalchemy.org/en/14/faq/performance.html#code-profiling to identify where there's a significant quantitative difference, then you can show it to me17:01
zzzeekjohnsom: also as these are test suites, it would have to be determined if the speed difference involves structural things that wouldnt' actualyl impact a real app the same, such as setup of mappings , cache warmup, etc.17:02
zzzeekthat said , 40% slower there is pretty dramatic so i hope to see where the callcounts have changed17:02
johnsomYeah, it's easy to A/B test like it did in that tox environment for that one test.17:03
zzzeekjohnsom: is htat like a special job you created to run a single test against two different reqs ?17:07
johnsomYes17:07
zzzeeki see17:07
johnsomhttps://review.opendev.org/c/openstack/octavia/+/801355/1/tox.ini17:08
zzzeekjohnsom: would need to see cprofiles17:10
johnsomYeah, I will see what I get on a few queries. That test is complex, but shows the magnitude.17:12
zzzeekjohnsom: yes a more focused profile would be even better.  you can send me raw profile files if you want17:12
zzzeekjohnsom: w/ pstats.dump_stats()17:13
johnsomOk, let me poke at this a bit this morning. I'll ping you back when I have something17:13
zzzeekor cprofile.dump_stats()17:13
zzzeekjohnsom: the bigget thing that can blow out performance is if there are simply more queries being emitted for some reason, like if an eagerload diective is not being caught17:15
zzzeekjohnsom: so try looking at SQL log output too and just look for any big quantitiative differences17:15
johnsomI looked at that last week. It actually seemed like there were less queries going out in 1.4.21.17:16
zzzeekjohnsom: also odd17:16
zzzeekjohnsom: well we eager load on refresh a bit....but a single test i wouldnt think has a lot of refresh going on17:17
johnsomIt's a bit rough guess though, there is pool health checks in there, etc. so there is going to be some variability run to run.17:17
*** rpittau is now known as rpittau|afk17:38

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!