[openstack-dev] [nova][neutron] Filtering Instances by IP address performance improvement test result

Zhenyu Zheng zhengzhenyulixi at gmail.com
Fri Jan 5 02:53:56 UTC 2018


Hi All,

We are working on patches to improve the performance filtering instance by
IP address this cycle. As discussed in the previous ML[1], it contains both
patches from Nova and Neutron[2][3][4][5][6].

As the POC is almost functional(the neutron extension part seems not
working, it cannot be successfully listed in patchset 14 of [5] , I have to
bypass the "if" condition for checking neutron "ip-substring-filtering"
extension to make it work, but that seems easy to fix), I made some tests
to check what kind of improvement has been done with those patches.

In the tests, I wrote a simple script [7](the script is silly, please don't
laugh at me:) ) which generated 2000 vm records in Nova DB with IP address
allocated(one IP for each vm), and also 2000 port records with
corresponding IP addresses in my local devstack env.

Before adding those patches, querying instance with a specific IP filtering
causes about 4000 ms, the test has been done several times, and I took the
averaged result:
[image: Inline image 1]

After adding those patches(and some modifications as mentioned above)
querying with the same request causes only about 400ms:
[image: Inline image 2]

So, the design seems working well.

I also tested with a "Sub-String" manner filtering with IP address:
192.168.7.2, which will match 66 instances, and it takes about 900ms:
[image: Inline image 3]

It increased, but seems reasonable as it matches more instances, and still
much better than current implementation.

Please test out in your own env if interested, the script might need some
modification as I hardcoded db connection, network_id and subnet_id.

And also, please help review the patches :)

[1]
http://lists.openstack.org/pipermail/openstack-operators/2017-October/014459.html
[2] https://review.openstack.org/#/c/509326/
[3] https://review.openstack.org/#/c/525505/
[4] https://review.openstack.org/#/c/518865/
[5] https://review.openstack.org/#/c/521683/
[6] https://review.openstack.org/#/c/525284/
[7]
https://github.com/zhengzhenyu/groceries/blob/master/Ip_filtering_performance_test.py

BR,

Kevin Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180105/a195a902/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 81123 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180105/a195a902/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 93064 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180105/a195a902/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 108188 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180105/a195a902/attachment-0005.png>


More information about the OpenStack-dev mailing list