Optimize /analytics/uves/<table>/* request queries

Bug #1741142 reported by Sundaresan Rajangam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
High
Sundaresan Rajangam
R3.1.1.x
Fix Committed
High
Sundaresan Rajangam
R3.2
Fix Committed
High
Sundaresan Rajangam
R4.0
Fix Committed
High
Sundaresan Rajangam
R4.1
Fix Committed
High
Sundaresan Rajangam
Trunk
Fix Committed
High
Sundaresan Rajangam

Bug Description

At present, contrail-analytics-api makes multiple/unnecessary calls to redis to get all the UVEs in a table.

uverserver.py: UveServer.multi_uve_get() first invokes UveCacheProcessor.get_cache_list(), which reads all the UVEs in a table from redis; then it iterates over individual UVE keys and read the corresponding UVE from redis again.

Tags: analytics
summary: - Optimize /analytics/uves/<table>/* request handling
+ Optimize /analytics/uves/<table>/* request queries
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/38673
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/38678
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/38679
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1.1.x

Review in progress for https://review.opencontrail.org/38680
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/38681
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/38685
Submitter: Sundaresan Rajangam (<email address hidden>)

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

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

commit efb19644a862287fea664599e8c43b5b224f7630
Author: Sundaresan Rajangam <email address hidden>
Date: Wed Jan 3 22:55:01 2018 -0800

Optimize UVEServer.multi_uve_get()

At present, multi_uve_get() invokes UveCacheProcessor.get_cache_list()
with keysonly=True to get the list of uve keys. It then iterates over
each uve key and invokes UveCacheProcessor.get_cache_uve().
This is an unncessary overhead and the above two calls can be replaced by
UveCacheProcessor.get_cache_list() with keysonly=False

Change-Id: I5251f30a335a62825ae07e1575f9ccf1a2e90051
Closes-Bug: #1741142

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/38678
Committed: http://github.com/Juniper/contrail-controller/commit/ae5c5ed17bfb75153fe8256e23797de0e98c6468
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit ae5c5ed17bfb75153fe8256e23797de0e98c6468
Author: Sundaresan Rajangam <email address hidden>
Date: Wed Jan 3 22:55:01 2018 -0800

Optimize UVEServer.multi_uve_get()

At present, multi_uve_get() invokes UveCacheProcessor.get_cache_list()
with keysonly=True to get the list of uve keys. It then iterates over
each uve key and invokes UveCacheProcessor.get_cache_uve().
This is an unncessary overhead and the above two calls can be replaced by
UveCacheProcessor.get_cache_list() with keysonly=False

Change-Id: I5251f30a335a62825ae07e1575f9ccf1a2e90051
Closes-Bug: #1741142

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

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

commit f7caf952033d2f5303ea2b5c4c9afb372f5aaa58
Author: Sundaresan Rajangam <email address hidden>
Date: Wed Jan 3 22:55:01 2018 -0800

Optimize UVEServer.multi_uve_get()

At present, multi_uve_get() invokes UveCacheProcessor.get_cache_list()
with keysonly=True to get the list of uve keys. It then iterates over
each uve key and invokes UveCacheProcessor.get_cache_uve().
This is an unncessary overhead and the above two calls can be replaced by
UveCacheProcessor.get_cache_list() with keysonly=False

Change-Id: I5251f30a335a62825ae07e1575f9ccf1a2e90051
Closes-Bug: #1741142

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/38680
Committed: http://github.com/Juniper/contrail-controller/commit/a4216a36283927dd40c2fb64ec6679b129214bb2
Submitter: Zuul (<email address hidden>)
Branch: R3.1.1.x

commit a4216a36283927dd40c2fb64ec6679b129214bb2
Author: Sundaresan Rajangam <email address hidden>
Date: Wed Jan 3 22:55:01 2018 -0800

Optimize UVEServer.multi_uve_get()

At present, multi_uve_get() invokes UveCacheProcessor.get_cache_list()
with keysonly=True to get the list of uve keys. It then iterates over
each uve key and invokes UveCacheProcessor.get_cache_uve().
This is an unncessary overhead and the above two calls can be replaced by
UveCacheProcessor.get_cache_list() with keysonly=False

Change-Id: I5251f30a335a62825ae07e1575f9ccf1a2e90051
Closes-Bug: #1741142

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

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

commit ffb55504f774e8f85cf827a987f2c59d26aad0f1
Author: Sundaresan Rajangam <email address hidden>
Date: Wed Jan 3 22:55:01 2018 -0800

Optimize UVEServer.multi_uve_get()

At present, multi_uve_get() invokes UveCacheProcessor.get_cache_list()
with keysonly=True to get the list of uve keys. It then iterates over
each uve key and invokes UveCacheProcessor.get_cache_uve().
This is an unncessary overhead and the above two calls can be replaced by
UveCacheProcessor.get_cache_list() with keysonly=False

Change-Id: I5251f30a335a62825ae07e1575f9ccf1a2e90051
Closes-Bug: #1741142

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/38685
Committed: http://github.com/Juniper/contrail-analytics/commit/f5c9889f3eba40ccc05d0640fb42c8445f8097a1
Submitter: Zuul (<email address hidden>)
Branch: master

commit f5c9889f3eba40ccc05d0640fb42c8445f8097a1
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Jan 4 12:03:27 2018 -0800

Optimize UVEServer.multi_uve_get()

At present, multi_uve_get() invokes UveCacheProcessor.get_cache_list()
with keysonly=True to get the list of uve keys. It then iterates over
each uve key and invokes UveCacheProcessor.get_cache_uve().
This is an unncessary overhead and the above two calls can be replaced by
UveCacheProcessor.get_cache_list() with keysonly=False

Change-Id: I10813285e39b761de6b840f2e315642ba55e7971
Closes-Bug: #1741142

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.