When num of port mappings is substantial, the response time of List API so slow

Bug #2019012 reported by Han Guangyu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Unassigned

Bug Description

Conditions:

I have a Victoria cluster with 1 controller node(also have
nova-compute service) and two compute node. ALL node boasts 128 CPU
cores and 512GB of memory.
I'm a super-user. I have this problem when trying the port forwarding feature.
I established 1500 port mappings for a single floating IP A. At this
point, the response time for the "List Floating IP Port Forwardings"
API[1] becomes remarkably slow, approaching a duration of 9 minutes.

[1] https://docs.openstack.org/api-ref/network/v2/index.html#list-floating-ip-port-forwardings

Step-by-step reproduction steps:

1. Create a floating ip

such as 10.10.16.10

2. At this time, the Port Forwarding List API response time is normal

```shell
floating_ip=10.10.16.10
openstack floating ip port forwarding list $floating_ip
```

3. create 1500 port forwarding for this floating ip

```shell
cat > creat-port-forwarding.sh << EOF
#!/bin/bash

floating_ip=10.10.16.10

source ./admin-openrc

for (( i=11001; i<11500; i++ )); do
        openstack floating ip port forwarding create --internal-ip-address 10.100.1.100 --port 72d49500-ba6e-4e82-bdc2-a72a836ef83e --internal-protocol-port \$i --external-protocol-port \$i --protocol tcp \$floating_ip
done
EOF

chmod +x create-port-forwarding.sh
./create-port-forwarding.sh
```

4. At this point, the response time for the "List Floating IP Port Forwardings"
API becomes remarkably slow, approaching a duration of 9 minutes.

```shell
floating_ip=10.10.16.10
openstack floating ip port forwarding list $floating_ip
```

Version:
Victoria
rpm install

Tags: api
description: updated
description: updated
description: updated
Revision history for this message
Christian Rohmann (christian-rohmann) wrote (last edit ):

Can you reproduce this with a current version of Neutron? Victoria is quite old. Having this appear also in the current code might encourage further analysis and writing a fix for this.

Is this a test environment and could you maybe enable debug logging see where the time is spent within the API? Maybe even down to the SQL queries?

Which ml2 are you using? Which plugins?

Revision history for this message
Han Guangyu (han-guangyu) wrote :

Ok, I will try to reproduce this with a current version of neutron. If have log, I will put deubg logging in this bug report.

I use openswitch now.

description: updated
description: updated
Revision history for this message
Han Guangyu (han-guangyu) wrote :

https://bugs.launchpad.net/neutron/+bug/1911462

This bug has been resolveed in Wallaby, close it

Changed in neutron:
status: New → Fix Released
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.