Comment 22 for bug 1804201

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/48072
Committed: http://github.com/Juniper/contrail-controller/commit/c2502b8ed38037715d9f1eb8bf5f15184ef5f4d2
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit c2502b8ed38037715d9f1eb8bf5f15184ef5f4d2
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