public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: bert hubert <bert.hubert@netherlabs•nl>
To: netdev@vger•kernel.org
Subject: IPv6 routing table max_size badly dimensioned compared to IPv4
Date: Thu, 27 Feb 2014 20:24:03 +0100	[thread overview]
Message-ID: <20140227192403.GA13472@xs.powerdns.com> (raw)

Hi everybody,

Today, a PowerDNS (open source dns, www.powerdns.com) deployment ran into
trouble with large amounts of IPv6 users.  It appears a large telco 'flicked
the switch'.  We had around 8000 DNS queries/s over IPv6, and everything
slowed to a crawl.  100% CPU utilization, most of it in the kernel. The same
amount of queries over IPv4 causes no problems.

Note, this system is not functioning as a router or anything. It is just
serving IPv6 DNS to a reasonable number of clients.

Thanks to diligent debugging and rapid help from friends over at SUSE, who
suggested setting net.ipv6.route.max_size to a higher than default value,
all problems were quickly resolved (thanks!).

>From a quick reading of ip6_dst_gc, it is obvious that exceeding the
max_size of the IPv6 routing table quickly becomes painful, causing non-stop
gc scans.

net.ipv6.route.max_size defaults to 4096. The equivalent setting for IPv4
defaults to 'millions' or is even dynamically sizing in modern kernels.

Now I know distributions can set this sysctl at will, but it appears that
many of them don't. It does appear odd that we still assume at a kernel
level that IPv6 is 'rare', a thousand times more rare than IPv4.

If people think this is a good idea, I could try to lift some of the other
'autosizing' code out there to get the IPv6 max_size limit raised on
non-contrained hardware. 

Please let me know!

-- 
PowerDNS Website: http://www.powerdns.com/
Contact us by phone on +31-15-7850372

             reply	other threads:[~2014-02-27 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 19:24 bert hubert [this message]
2014-02-27 19:59 ` IPv6 routing table max_size badly dimensioned compared to IPv4 Eric Dumazet
2014-02-27 20:05   ` bert hubert
2014-02-27 20:08   ` Hannes Frederic Sowa
2014-02-27 20:23     ` Eric Dumazet
2014-02-27 20:50       ` Hannes Frederic Sowa
2014-02-27 21:02         ` Eric Dumazet
2014-02-27 22:47           ` David Miller
2014-02-28 11:07             ` bert hubert
2014-04-04 16:03               ` Lukas Tribus

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=20140227192403.GA13472@xs.powerdns.com \
    --to=bert.hubert@netherlabs$(echo .)nl \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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