commit ebf603fb438058d01b889b20780bfb6a309b1ec2
Author: Sai Sindhur Malleni <email address hidden>
Date: Mon Aug 13 16:36:55 2018 +0530
Implement Baked Query
When running a performance and scale testing scenario to create
100 networks, subnets and one VM per subnet, we observe that the function
get_pending_or_processing_ops is called 5636 times (total time of 0.426 seconds
and cumulative time of 135 seconds) and get_oldest_pending_db_row_with_lock
is called 8450 times (total time 1.747 seconds and cumulative time 685 seconds).
This patch implements baked queries to reduce time spent in these functions.
The "baked" query system in SQLAlchemy caches the string
SQL statement for a particular Query-construction path. As
some profiling in Neutron have observed 30-40% time spent in
constructing Query objects due to the many small "fetch-one-object"
style of query, the "baked" system may potentially be able to
greatly reduce this in neutron and its drivers. Networkind-odl is
traditionally known to slow down things due to journaling and this
patch aims to improve that situation. Baked Query Docs: http://docs.sqlalchemy.org/en/latest/orm/extensions/baked.html
Profiling networking-odl, we see that the with baked queries
time spent in get_pending_or_processing_ops reduced by 40.7%
and time spent in get_oldest_pending_db_row_with_lock reduced by 60.6%.
Closes-Bug: 1791348
Change-Id: Ieb5f14e100ea48facc1bfd2169e29b42617c6ac1
(cherry picked from commit 7fdbd351066e7014052caa9cc3af7f74b7952990)
Reviewed: https:/ /review. openstack. org/607149 /git.openstack. org/cgit/ openstack/ networking- odl/commit/ ?id=ebf603fb438 058d01b889b2078 0bfb6a309b1ec2
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit ebf603fb438058d 01b889b20780bfb 6a309b1ec2
Author: Sai Sindhur Malleni <email address hidden>
Date: Mon Aug 13 16:36:55 2018 +0530
Implement Baked Query
When running a performance and scale testing scenario to create pending_ or_processing_ ops is called 5636 times (total time of 0.426 seconds pending_ db_row_ with_lock docs.sqlalchemy .org/en/ latest/ orm/extensions/ baked.html
100 networks, subnets and one VM per subnet, we observe that the function
get_
and cumulative time of 135 seconds) and get_oldest_
is called 8450 times (total time 1.747 seconds and cumulative time 685 seconds).
This patch implements baked queries to reduce time spent in these functions.
The "baked" query system in SQLAlchemy caches the string
SQL statement for a particular Query-construction path. As
some profiling in Neutron have observed 30-40% time spent in
constructing Query objects due to the many small "fetch-one-object"
style of query, the "baked" system may potentially be able to
greatly reduce this in neutron and its drivers. Networkind-odl is
traditionally known to slow down things due to journaling and this
patch aims to improve that situation. Baked Query Docs:
http://
Profiling networking-odl, we see that the with baked queries or_processing_ ops reduced by 40.7% pending_ db_row_ with_lock reduced by 60.6%.
time spent in get_pending_
and time spent in get_oldest_
Closes-Bug: 1791348 facc1bfd2169e29 b42617c6ac1 4052caa9cc3af7f 74b7952990)
Change-Id: Ieb5f14e100ea48
(cherry picked from commit 7fdbd351066e701