[ovs-discuss] ovsdb-server memory increase obviously when ovs-vsctl list interface command hang

Huangjian (J) huangjian.huangjian at huawei.com
Sat Jun 24 12:22:24 UTC 2017

Hi, all

If someone occurs this situation, and has some advices to avoid or fix the increment of memory when ovs-vsctl hangs.

Where is the code that cause the increment of memory?

Ovs version 2.5.0

Reproduce steps:

i. create 1000+ bridges and 1500+ internal ports (the number of bridges and ports relates with the speed of memory increase)
ii. run ovs-vsctl list interface command with gdb, and set breakpoint on ovsdb_idl_is_alive, should run gdb continue command with 10+ times
iii. create bridges and ports repeatly in background with a scripts
vi. query bridges and ports with command: ovs-vsctl list interface; ovs-vsctl list bridges; ovs-vsctl list ports, also in background with a script without sleep

query ovsdb-server memory info with ps aux | grep ovsdb-server | grep -v grep command, rss memory increase rate: ~800MB per hour

environment infomation:
# ps aux | grep ovsdb-server | grep -v grep
root      1961 78.6  1.2 1170132 990952 ?      R<s  19:10  63:06 ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:info -vfile:off --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach

create bridges scripts:
# cat run_1000_add_del_port.sh
for((i=0; i<$RUNTIME; i++))
	for((j=400; j<1000; j++))
        	ovs-vsctl list bridge br-hjian-$j
		ovs-vsctl add-br br-hjian-$j
		ovs-vsctl --timeout=10 add-port br-hjian-$j qvm3twasaaa-$j -- set Interface qvm3twasaaa-$j type=internal


More information about the discuss mailing list