netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Strange CPU load when flushing route cache (kernel 2.6.31.6)
@ 2009-11-23  9:58 Jesper Dangaard Brouer
  2009-11-23 10:29 ` Eric Dumazet
  2009-11-23 15:07 ` robert
  0 siblings, 2 replies; 9+ messages in thread
From: Jesper Dangaard Brouer @ 2009-11-23  9:58 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Linux Kernel Network Hackers, Robert Olsson

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

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?

-- 
Med venlig hilsen / Best regards
  Jesper Brouer
  ComX Networks A/S
  Linux Network Kernel Developer
  Cand. Scient Datalog / MSc.CS
  Author of http://adsl-optimizer.dk
  LinkedIn: http://www.linkedin.com/in/brouer

[-- Attachment #2: CPU_usage.png --]
[-- Type: image/png, Size: 16710 bytes --]

[-- Attachment #3: CPU_usage_softirq.png --]
[-- Type: image/png, Size: 15344 bytes --]

[-- Attachment #4: PPS_eth1-rx.png --]
[-- Type: image/png, Size: 10930 bytes --]

[-- Attachment #5: route_cache.png --]
[-- Type: image/png, Size: 17499 bytes --]

[-- Attachment #6: softnet_time_squeeze.png --]
[-- Type: image/png, Size: 15145 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-26 11:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23  9:58 Strange CPU load when flushing route cache (kernel 2.6.31.6) Jesper Dangaard Brouer
2009-11-23 10:29 ` Eric Dumazet
2009-11-23 12:28   ` Jesper Dangaard Brouer
2009-11-23 13:25     ` Eric Dumazet
2009-11-23 13:48       ` Jesper Dangaard Brouer
2009-11-23 14:03         ` Eric Dumazet
2009-11-26 10:51           ` Jesper Dangaard Brouer
2009-11-26 11:05             ` Eric Dumazet
2009-11-23 15:07 ` robert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).