Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: cold cold <nedkonedev@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: 0% cpu usasge after fresh boot or net restart but 10% CPU if kernel  flush route cache
Date: Wed, 27 Jan 2010 16:26:16 +0100	[thread overview]
Message-ID: <1264605976.3197.8.camel@edumazet-laptop> (raw)
In-Reply-To: <41ac0f9e1001260858o7d2a6a6dgb37ecfba5c325932@mail.gmail.com>

Le mardi 26 janvier 2010 à 18:58 +0200, cold cold a écrit :
> HI,
> 
> 
> i have expiriance some CPU usage spikes up to 10% on each four cpus
> after the first kernel route cache flush.
> After mashine start first 20 min CPU is 0%si  300Mbits/s full duplex
> and arount 100k pps forwarded traffic, without any firewall, just
> plain routing.
> 
> route -n |wc -l
> 34
> 
> ip route show cache | wc -l
> 2140842
> 
> cat /proc/sys/net/ipv4/route/secret_interval
> 600
> cat /proc/sys/net/ipv4/route/max_size
> 33554432
> 
> after kernel  flush i got 10% on all CPUs for 5-6 mins.  It's not from
> rebuilding route cashe becouse after
> fresh boot or network restrat there is no CPU usage until kernel flush
> route cache.
> I try to play with rhash_entries= 300000 to 2000000 same result.

If you have one million dst entries to flush, it takes some time.

You could try to not increase the rhash_entries 
(or keep it low, say 131072)
but tune /proc/sys/net/ipv4/route settings.

Try to reduce gc_elasticity from 8 to 2
Try to reduce gc_interval from 60 to 1

Important thing to consider is to irq affinities (so that one cpu
handles network interrupts, to minimize cache ping poings )




  reply	other threads:[~2010-01-27 15:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 16:58 0% cpu usasge after fresh boot or net restart but 10% CPU if kernel flush route cache cold cold
2010-01-27 15:26 ` Eric Dumazet [this message]
2010-01-27 19:53   ` cold cold
2010-01-27 21:18     ` Eric Dumazet
2010-01-28  9:14       ` cold cold
2010-01-28 16:09         ` Eric Dumazet
2010-01-28 16:26           ` cold cold
2010-01-28 17:06             ` Eric Dumazet
2010-01-28 18:49               ` cold cold
2010-01-28 21:16                 ` Eric Dumazet
2010-01-29  7:38                   ` cold cold
2010-01-29  9:06                     ` Eric Dumazet

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=1264605976.3197.8.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=nedkonedev@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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