From: David Ahern <dsa@cumulusnetworks•com>
To: alexander.h.duyck@redhat•com
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: increase in time to delete an interface with 4.x kernels
Date: Mon, 27 Jul 2015 10:49:48 -0600 [thread overview]
Message-ID: <55B6612C.7050506@cumulusnetworks.com> (raw)
Hi Alex:
I believe you did the recent overhaul to the fib implementation. I am
seeing dramatically higher times to delete an interface with an ipv4
address in 4.2-rc3. perf-top points to update_suffix:
PerfTop: 15834 irqs/sec kernel:97.3% exact: 0.0% [4000Hz
cpu-clock], (all, 4 CPUs)
-------------------------------------------------------------------------------------------
74.69% [kernel] [k] update_suffix
2.38% [kernel] [k] fib_table_flush
2.20% [kernel] [k] fib6_walk_continue
2.03% [kernel] [k] fib6_ifdown
1.31% [kernel] [k] fib6_age
I have a simple script to create and assign an ipv4 address to 10k dummy
interfaces:
l=0
for (( j = 1; j <= 40; j += 1))
do
for (( k = 1 ; k <= 250 ; k += 1 ))
do
l=$((l + 1))
ip link add dev dummy${l} type dummy
ip addr add 72.$j.$k.1/24 dev dummy${l}
ifconfig dummy${l} up
done
done
and a counter script to delete them all:
k=$(ip link show | grep dummy | wc -l)
for (( j = 1; j <= k; j += 1))
do
ip link del dev dummy${j}
done
Looking at v3.19:
# time ./tadd-dummy.sh
real 3m8.896s
user 0m7.104s
sys 0m22.020s
# time ./tdel-dummy.sh
real 7m18.207s
user 0m3.824s
sys 3m15.672s
And the time to delete 1 interface after all 10k have been created:
# time ip link del dev dummy6666
real 0m0.064s
user 0m0.000s
sys 0m0.020s
Contrast those times with 4.2.0-rc3+ running the exact same scripts
# time ./tadd-dummy.sh
real 2m51.044s
user 0m7.220s
sys 0m29.520s
# time ip link del dev dummy6666
real 0m0.441s
user 0m0.000s
sys 0m0.416s
so here the time to delete 1 interface has gone up by more than 10x.
# time ./tdel-dummy.sh
^C
real 14m10.000s
user 0m0.528s
sys 13m14.728s
I killed the delete; after 14 minutes only ~2k+ interfaces had been deleted:
# ip link show | grep dummy | wc -l
7822
In 4.2.0-rc3 it seems to take about 60 seconds to delete 150 interfaces
which is inline with the 1 interface time of 0.4 seconds.
David
next reply other threads:[~2015-07-27 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 16:49 David Ahern [this message]
2015-07-27 17:36 ` increase in time to delete an interface with 4.x kernels Alexander Duyck
2015-07-27 20:08 ` [net PATCH] fib_trie: Drop unnecessary calls to leaf_pull_suffix Alexander Duyck
2015-07-27 21:02 ` David Ahern
2015-07-27 21:51 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B6612C.7050506@cumulusnetworks.com \
--to=dsa@cumulusnetworks$(echo .)com \
--cc=alexander.h.duyck@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox