Octavia GET request for members in pool takes a lot of time on huge Loadbalancer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Create LB with big topology, f.e.:
39 listeners with 1 pool and 13 members in this pool.
so totally it will be about 600 objects in the objects graph:
39 Listeners, 39 HMs, 39 pools, 13*39 members, LB, VIP, etc...
Such setup allows to display performance issue with GET requests.
Specifically when I try to get information about members in pools, i.e. call:
GET /v2/lbaas/
This call takes around 2.5 seconds.
GET /v2/lbaas/
After profiling code for handling GET request, I found, that around 1 sec on call:
model.to_
https:/
Looks, like it happens due to recursive iteration through all nodes in graph (https:/
Probably this could be optimised by only one step of recursive call, i.e. do not go through all nodes in the graph (for member it's only 1 pool, instead of all 600+ nodes in graph).
During local testing on the same topology with only one recursive call, it took around:
1.2 sec:
GET /v2/lbaas/
Fix proposed to branch: master /review. opendev. org/c/openstack /octavia/ +/883063
Review: https:/