Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Apr 2009 18:39:18 -0700 (PDT)
On Fri, 10 Apr 2009, David Miller wrote:
[ CC:'ing netfilter-devel and netdev... ]
I wonder if we should bring in the RCU people too, for them to tell you
that the networking people are beign silly, and should not synchronize
with the very heavy-handed
synchronize_net()
but instead of doing synchronization (which is probably why adding a few
hundred rules then takes several seconds - each synchronizes and that
takes a timer tick or so), add the rules to be free'd on some rcu-freeing
list for later freeing.
Or whatever. Paul? synchronize_net() just calls synchronize_rcu(), and
with that knowledge and a simple
git show 784544739a25c30637397ace5489eeb6e15d7d49
I bet you can already tell people how to fix their performance issue.
Linus
---
--On Fri, 10 Apr 2009 17:15:52 +0800 (SGT)
Jeff Chua <jeff.chua.linux@xxxxxxxxx> wrote:
Adding 200 records in iptables took 6.0sec in 2.6.30-rc1 compared to
0.2sec in 2.6.29. I've bisected down this commit.
There are a few patches on top of the original patch. When I reverted the
original commit + changing rcu_read() to rcu_read_bh(), it speeds up the
inserts back to .2sec again.
I'm loading all the firewall rules during boot-up and this 6 secs slowness
is really not very nice to wait for.
The performance benefit during operation is more important. The load
time is fixable. The problem is probably generic to any set of rules,
but could you post some info about your configuration (like the rule
set), and the system configuration (# of cpu's, config etc).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49
- From: Paul E. McKenney
- Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49
- References:
- iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49
- From: Jeff Chua
- Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49
- From: Stephen Hemminger
- Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49
- From: David Miller
- iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49
- Prev by Date: Re: [linux-pm] [2.6.30-rc1-git2 regressions] Hibernation broken and (minor but annoying) audio problem
- Next by Date: Re: [PATCH] driver core: check bus->match without holding device lock(v2)
- Previous by thread: Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49
- Next by thread: Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49
- Index(es):
Relevant Pages
|