From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Hans Schillstrom <hans.schillstrom@ericsson.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>, Martin Topholm <mph@hoth.dk>,
netdev <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH] tcp: Fast/early SYN handling to mitigate SYN floods
Date: Thu, 24 May 2012 19:32:09 +0200 [thread overview]
Message-ID: <1337880729.2388.23.camel@localhost> (raw)
In-Reply-To: <201205241529.37684.hans.schillstrom@ericsson.com>
On Thu, 2012-05-24 at 15:20 +0200, Hans Schillstrom wrote:
> Hi Jesper
> We are also working with this issue right now,
>
[..]
> > [RFC PATCH] tcp: Fast/early SYN handling to mitigate SYN floods
> >
> > TCP SYN handling is on the slow path via tcp_v4_rcv(), and is
> > performed while holding spinlock bh_lock_sock().
> >
> > Real-life and testlab experiments show, that the kernel choks
> > when reaching 130Kpps SYN floods (powerful Nehalem 16 cores).
> > Measuring with perf reveals, that its caused by
> > bh_lock_sock_nested() call in tcp_v4_rcv().
>
> I can confirm this too, and it doesn't scale with more cores
>
> >
> > With this patch, the machine can handle 750Kpps (max of the SYN
> > flood generator) with cycles to spare.
>
> This looks great.
Yes, its definitely shows that there is huge performance gain hidden
here! But we still have to handle locking (which will affect perf).
> I'm also working with a solution that not trash conntack
> i.e. have conntrack working during a heavy SYN attack
Sounds interesting, but that's a separate problem. In this case I have
disabled conntracking (I even disabled flow-control and drop the syn-ack
responses on the generator).
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Sr. Network Kernel Developer at Red Hat
Author of http://www.iptv-analyzer.org
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2012-05-24 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 13:01 [RFC PATCH] tcp: Fast/early SYN handling to mitigate SYN floods Jesper Dangaard Brouer
2012-05-24 13:20 ` Hans Schillstrom
2012-05-24 17:32 ` Jesper Dangaard Brouer [this message]
2012-05-24 13:26 ` Christoph Paasch
2012-05-24 14:51 ` Eric Dumazet
2012-05-24 17:21 ` Jesper Dangaard Brouer
2012-05-24 17:27 ` 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=1337880729.2388.23.camel@localhost \
--to=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=hans.schillstrom@ericsson.com \
--cc=mph@hoth.dk \
--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).