All of lore.kernel.org
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: netdev@oss.sgi.com
Subject: Re: [fw@deneb.enyo.de: Route cache performance under stress]
Date: Sun, 6 Apr 2003 11:14:50 -0400 (EDT)	[thread overview]
Message-ID: <20030406110728.G68419@shell.cyberus.ca> (raw)
In-Reply-To: <87n0j3ltf0.fsf@deneb.enyo.de>



On Sun, 6 Apr 2003, Florian Weimer wrote:

> > You may find that aggressive gc is one of your problems infact.
>
> I don't think so.  During a DoS attack with spoofed source addresses,
> the dst cache quickly fills up, and the overwhelming majority of the
> entries is useless (they won't be used again).  The slabinfo line
> looks like this:
>
> ip_dst_cache      116477 131080    192 6554 6554    1
>
> There are only 8192 hash buckets on this system, and if we assume that
> the entries are uniformly distributed over the buckets (which is not
> necessarily true), the code in ip_route_input() has to look at 14 or
> 15 cache entries before the miss is detected.  I can hardly see how
> this is efficient.
>

Do:
cat /proc/net/rt_cache_stat
Should give us a lot more info.

> > I dont see the correlation of syn attacks and the dst cache in your
> > description. Can you collect some profiles?
>
> On the machine above, the dst cache has 2**17 entries.  Imagine what
> happens if all these entries are chained to the same bucket, and the
> chain has to be traversed for each packet.

Yes, in that (worse case) scenario, you have two effects one of walking a
lot of elements before finding you have a cache miss and then being forced
into a slow path after all that pain. The cache miss is not as
expensive compared to the slow path execution. Youd have to walk a lot
entries to get the same effect as being forced one time into slow path.
Again, this is my qualm with the papers general pov.

> > Our data was collected on a real ISP which hosts a lot of web
> > servers and was being constantly DOSed. I dont think you can get
> > more real world than that.
>
> Did you look at a router, or at a host?

As a router, but the hash compute shouldnt matter.

cheers,
jamal

  reply	other threads:[~2003-04-06 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-05 16:50 [fw@deneb.enyo.de: Route cache performance under stress] bert hubert
2003-04-05 19:02 ` jamal
2003-04-05 22:55   ` Florian Weimer
2003-04-05 23:48     ` jamal
2003-04-06 12:08       ` Florian Weimer
2003-04-06 15:14         ` jamal [this message]
2003-04-06 16:42           ` Florian Weimer
2003-04-06 17:20             ` Robert Olsson

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=20030406110728.G68419@shell.cyberus.ca \
    --to=hadi@cyberus.ca \
    --cc=fw@deneb.enyo.de \
    --cc=netdev@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.