Reviewed: https://review.opencontrail.org/48057 Committed: http://github.com/Juniper/contrail-controller/commit/ab30adcff0f8d4a482d8bde578f09d9708ee86ed Submitter: Zuul v3 CI (<email address hidden>) Branch: master
commit ab30adcff0f8d4a482d8bde578f09d9708ee86ed Author: Alexander Ankudinov <email address hidden> Date: Tue Nov 20 17:55:07 2018 +0500
Optimize ObjectCacheManager
Don't use sets when calculating cache hit
Test results on a database with around 16000 floating ips and 10000 VMs (for original patch for R3.2).
Without patch:
$ time wget 'http://10.100.12.171:8082/virtual-machine-interfaces?count=False' real 0m9.444s (+- 0.1 seconds) $ time wget 'http://10.100.12.171:8082/floating-ips?count=False' real 0m23.466s (+- 1 seconds) $ ab -n3000 http://10.100.12.171:8082/floating-ip/c0e90af8-f10c-4202-ad01-357b0e369442 Requests per second: 146.96 [#/sec] (mean) Time per request: 6.805 [ms] (mean)
With patch:
$ time wget 'http://10.100.12.171:8082/virtual-machine-interfaces?count=False' real 0m3.107s (+- 2 seconds) $ time wget 'http://10.100.12.171:8082/floating-ips?count=False' real 0m7.127s (+- 1 seconds) $ ab -n3000 http://10.100.12.171:8082/floating-ip/c0e90af8-f10c-4202-ad01-357b0e369442 Requests per second: 271.36 [#/sec] (mean) Time per request: 3.685 [ms] (mean)
Closes-bug: 1804201 Change-Id: I3150787bfbc61646ecd7006040c649b83f36c1a7
Reviewed: https:/ /review. opencontrail. org/48057 github. com/Juniper/ contrail- controller/ commit/ ab30adcff0f8d4a 482d8bde578f09d 9708ee86ed
Committed: http://
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master
commit ab30adcff0f8d4a 482d8bde578f09d 9708ee86ed
Author: Alexander Ankudinov <email address hidden>
Date: Tue Nov 20 17:55:07 2018 +0500
Optimize ObjectCacheManager
Don't use sets when calculating cache hit
Test results on a database with around 16000 floating ips
and 10000 VMs (for original patch for R3.2).
Without patch:
$ time wget 'http:// 10.100. 12.171: 8082/virtual- machine- interfaces? count=False' 10.100. 12.171: 8082/floating- ips?count= False' 10.100. 12.171: 8082/floating- ip/c0e90af8- f10c-4202- ad01-357b0e3694 42
real 0m9.444s (+- 0.1 seconds)
$ time wget 'http://
real 0m23.466s (+- 1 seconds)
$ ab -n3000 http://
Requests per second: 146.96 [#/sec] (mean)
Time per request: 6.805 [ms] (mean)
With patch:
$ time wget 'http:// 10.100. 12.171: 8082/virtual- machine- interfaces? count=False' 10.100. 12.171: 8082/floating- ips?count= False' 10.100. 12.171: 8082/floating- ip/c0e90af8- f10c-4202- ad01-357b0e3694 42
real 0m3.107s (+- 2 seconds)
$ time wget 'http://
real 0m7.127s (+- 1 seconds)
$ ab -n3000 http://
Requests per second: 271.36 [#/sec] (mean)
Time per request: 3.685 [ms] (mean)
Closes-bug: 1804201 46ecd7006040c64 9b83f36c1a7
Change-Id: I3150787bfbc616