[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B0A63FA.5000804@gmail.com>
Date: Mon, 23 Nov 2009 11:29:14 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jesper Dangaard Brouer <jdb@...x.dk>
CC: Linux Kernel Network Hackers <netdev@...r.kernel.org>,
Robert Olsson <robert@...julf.net>
Subject: Re: Strange CPU load when flushing route cache (kernel 2.6.31.6)
Jesper Dangaard Brouer a écrit :
> Hi Eric and netdev,
>
> I have observed a strange route cache behaviour when I upgraded some
> of my production Linux routers (1Gbit/s tg3) to kernel 2.6.31.6 (from
> kernel 2.6.25.7).
>
> Every time the route cache is flushed I get a CPU spike (in softirq)
> with a tail. I have attached some graphs that illustrate the issue
> (hope vger.kernel.org will allow these attachments...)
>
>
> I have done some tuning of the route cache:
>
> # From /etc/sysctl.conf
> #
> # Adjusting the route cache flush interval
> net/ipv4/route/secret_interval = 1200
>
> # Limiting the route cache size
> # ip_dst_cache slab objects is 256 bytes.
> # 2000000 * 256 bytes = 512 MB
> net/ipv4/route/max_size = 2000000
>
> Boot parameters: "rhash_entries=262143 vmalloc=256M"
>
> The rhash_entries is for the route cache hash size. The vmalloc is
> needed because I have _very_ large iptables rulesets (and is running
> on a 32-bit kernel, due to old hardware).
>
> Any thoughs on how to avoid these CPU spikes?
> Or where the issue occurs in the code?
>
Sure, after a flush, we have to rebuild the cache, so extra work is expected.
(We receive a packet, notice the cached entry is obsolete, free it, allocate a new one
and inert it into cache)
If you dont want these spikes, just dont flush cache :)
Do you run a 2G/2G User/Kernel split kernel ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists