linuxbridge agent is using too much memory

Bug #1393362 reported by Darragh O'Reilly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Darragh O'Reilly
Juno
Fix Released
Undecided
Unassigned

Bug Description

When vxlan is configured:

$ ps aux | grep linuxbridge
vagrant 21051 3.2 28.9 504764 433644 pts/3 S+ 09:08 0:02 python /usr/local/bin/neutron-linuxbridge-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini

A list with over 16 million numbers is created here:

 for segmentation_id in range(1, constants.MAX_VXLAN_VNI + 1):

https://github.com/openstack/neutron/blob/b5859998bc662569fee4b34fa079b4c37744de2c/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py#L526

and does not seem to be garbage collected for some reason.

Using xrange instead:

$ ps -aux | grep linuxb
vagrant 7397 0.1 0.9 106412 33236 pts/10 S+ 09:19 0:05 python /usr/local/bin/neutron-linuxbridge-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini

Changed in neutron:
assignee: nobody → Darragh O'Reilly (darragh-oreilly)
status: New → In Progress
tags: added: lb
Revision history for this message
Darragh O'Reilly (darragh-oreilly) wrote :
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → kilo-1
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/134892
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0bf69ad80fb77773e767e116357cf6e1666b3f5d
Submitter: Jenkins
Branch: master

commit 0bf69ad80fb77773e767e116357cf6e1666b3f5d
Author: Darragh O'Reilly <email address hidden>
Date: Mon Nov 17 10:20:58 2014 +0000

    linuxbridge-agent: make vxlan unicast check more efficent

    A list with the full range of vxlan VNIs (1 to 2**24) was using
    over 300MB of memory. This patch uses xrange instead of range.

    Closes-Bug: #1393362
    Change-Id: I21ccab758e7911712690fd5e732f64361e809264

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/137087

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/juno)

Reviewed: https://review.openstack.org/137087
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=56b0029014ff7e844c2fde45f7b52b7f115757e8
Submitter: Jenkins
Branch: stable/juno

commit 56b0029014ff7e844c2fde45f7b52b7f115757e8
Author: Darragh O'Reilly <email address hidden>
Date: Mon Nov 17 10:20:58 2014 +0000

    linuxbridge-agent: make vxlan unicast check more efficent

    A list with the full range of vxlan VNIs (1 to 2**24) was using
    over 300MB of memory. This patch uses xrange instead of range.

    Closes-Bug: #1393362
    Change-Id: I21ccab758e7911712690fd5e732f64361e809264
    (cherry picked from commit 0bf69ad80fb77773e767e116357cf6e1666b3f5d)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
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.