potential performance issue when scheduling network segments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Sahid Orentino |
Bug Description
During some investigations regarding segments we may have noticed performance issues related to the current algorithm that schedules network segments on hosts.
When an agent is reporting a change in segment, the process goes to the function `auto_schedule_
This function is retrieving from the segments the related networks, then we can notice that the algorithm is running a double for loop. That one iterates through network and per segments to schedule network segments on all hosts.
for network_id in network_ids:
for segment in segments:
Depending on the design chosen, in a setup that has hundred segments per host with hundred networks and potentially segments that share the same list of hosts, we will endup by calling _schedule_network 10000 times with duplication.
To avoid such duplication and unnecessary calls of _schedule_network for the same hosts we may want to provide a datastructure that is storing for each network the hosts already scheduled.
for network_id in network_ids:
for segment in segments:
if not _already_
With this same scenario, and by using such algorithm we may reduce the number of call per the number of networks, 100.
Thanks,
s.
Changed in neutron: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in neutron: | |
assignee: | nobody → Sahid Orentino (sahid-ferdjaoui) |
Thanks for the bug report, do you have perhaps time to implement this solution?