netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Wolfgang Walter <linux@stwm.de>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>,
	hannes@stressinduktion.org, netdev@vger.kernel.org,
	klassert@mathematik.tu-chemnitz.de
Subject: Re: Big performance loss from 3.4.63 to 3.10.13 when routing ipv4
Date: Fri, 25 Oct 2013 10:01:58 +0200	[thread overview]
Message-ID: <20131025080158.GC31491@secunet.com> (raw)
In-Reply-To: <5743349.5WGxWa1M1u@ei.h3.stusta.mhn.de>

On Thu, Oct 24, 2013 at 12:52:58AM +0200, Wolfgang Walter wrote:
> On Wednesday 23 October 2013 10:06:32 Eric Dumazet wrote:
> > On Wed, 2013-10-23 at 18:59 +0200, Wolfgang Walter wrote:
> > > Ah, ok. I use SLUB, but SLABINFO=y.
> > > 
> > > Without much traffic it is:
> > > 
> > > # grep dst /proc/slabinfo
> > > xfrm_dst_cache      4435   4608    448   36    4 : tunables    0    0    0
> > > : slabdata    128    128      0
> > > 
> > > on the big one.
> > > 
> > > I can recompile the kernels with SLAB instead of SLUB if SLAB gives more
> > > usefull infos.
> > Not needed, because it seems we do not merge this SLUB cache with
> > another one.
> 
> Ok. I can't see xfrm_dst_cache on 32bit-systems, though.
> 
> > 
> > So please post this information, because I believe the default should be
> > 65536, not 1024 or 4096
> > 
> 
> Indeed I already saw higher values, at the moment I see:
> 
> # while true; do grep dst /proc/slabinfo ; sleep 1; done
> xfrm_dst_cache     12636  12636    448   36    4 : tunables    0    0    0 : slabdata    351    351      0

We currently start the garbage collector if we have more than gc_thresh
(1024) dst entries allocated and refuse new allocations at 2 * gc_thresh.

So maybe we should set gc_thresh to 32768. Than we can have 65536 dst
entries in the system (cache + packets in flight) before we refuse
new allocations. In paticular we can still cache another 32768 dst
entries after the garbage collector was started. It looks like you
had never more than 15000 dst entries cached, so a default of 32768
looks reasonable and should also keep smaller embedded routers happy.

  reply	other threads:[~2013-10-25  8:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 16:39 Big performance loss from 3.4.63 to 3.10.13 when routing ipv4 Wolfgang Walter
2013-10-01 18:57 ` Brian Haley
2013-10-01 19:44   ` Wolfgang Walter
2013-10-01 22:20 ` Hannes Frederic Sowa
2013-10-22 19:07   ` Wolfgang Walter
2013-10-22 19:46     ` David Miller
2013-10-23  8:12       ` Steffen Klassert
2013-10-23 11:33         ` Wolfgang Walter
2013-10-23 12:00           ` Eric Dumazet
2013-10-23 12:26             ` Steffen Klassert
2013-10-23 15:57             ` Wolfgang Walter
2013-10-23 12:04           ` Steffen Klassert
2013-10-23 16:05             ` Wolfgang Walter
     [not found] ` <3169911.kTmZ0BZVVr@h2o.as.studentenwerk.mhn.de>
     [not found]   ` <1382547992.7572.31.camel@edumazet-glaptop.roam.corp.google.com>
2013-10-23 22:52     ` Wolfgang Walter
2013-10-25  8:01       ` Steffen Klassert [this message]
2013-10-25  8:50         ` Eric Dumazet
2013-10-25  9:20           ` Steffen Klassert
2013-10-28  4:43             ` David Miller
2013-10-28  6:17             ` Eric Dumazet
2013-10-28 11:30               ` Steffen Klassert
2013-10-25  9:33         ` Wolfgang Walter
2013-10-24 11:07     ` Wolfgang Walter

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=20131025080158.GC31491@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@stressinduktion.org \
    --cc=klassert@mathematik.tu-chemnitz.de \
    --cc=linux@stwm.de \
    --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;
as well as URLs for NNTP newsgroup(s).