Comment 0 for bug 1813253

Revision history for this message
Chengqian Liu (liuchengqian90) wrote : Neutron-server takes a long time when creating a port with multiple addresses at once

openstack allinone.

16 cpus with 2.40GHz
16G memery

only one subnet in a network.

neutron port-create --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 --fixed-ip subnet_id=474b9575-b569-48dd-a3f2-0b02b752c098 66105fab-7ea9-4efc-b9c8-1839f742bdd1

When there are already 6200 addresses, it takes 50s to allocate the address part every time the command is run.

in _generate_ips,
2s+ for list_allocations
2s+ for ip_allocations.add(ipallocation.ip_address)
10 times.

https://github.com/drkjam/netaddr/issues/171