From: David Miller <davem@davemloft.net>
To: peter.hicks@poggs.co.uk
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: Thousands of interfaces
Date: Tue, 31 Oct 2006 01:31:54 -0800 (PST) [thread overview]
Message-ID: <20061031.013154.122620846.davem@davemloft.net> (raw)
In-Reply-To: <20061031092550.GA8201@tufnell.london.poggs.net>
From: Peter Hicks <peter.hicks@poggs.co.uk>
Date: Tue, 31 Oct 2006 09:25:50 +0000
[ Discussion belongs on netdev@vger.kernel.org, added to CC: ]
> I have a dual 3GHz Xeon machine with a 2.4.21 kernel and thousands (15k+) of
> ipip tunnel interfaces. These are being used to tunnel traffic from remote
> routers, over a private network, and handed off to a third party.
...
> Is it possible to speed up creation of the interfaces? Currently it takes
> around 24 hours. Is there are more efficient way to handle a very large
> number of IP-IP tunnels? Would upgrading to a 2.6 kernel be of use?
We just simply never imagined people would use IP tunnels on
this scale.
The following kernel patch is a quick hack that will get things to
work quickly for you, but longer term we need to add dynamic hash
table growth to this thing (and SIT tunnel, and IP GRE tunnel,
etc. etc. etc.)
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 0c45565..78055cf 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -117,8 +117,8 @@ #include <net/ipip.h>
#include <net/inet_ecn.h>
#include <net/xfrm.h>
-#define HASH_SIZE 16
-#define HASH(addr) ((addr^(addr>>4))&0xF)
+#define HASH_SIZE 16384
+#define HASH(addr) ((addr^(addr>>14))&(HASH_SIZE - 1))
static int ipip_fb_tunnel_init(struct net_device *dev);
static int ipip_tunnel_init(struct net_device *dev);
next prev parent reply other threads:[~2006-10-31 9:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-31 9:25 Peter Hicks
2006-10-31 9:31 ` David Miller [this message]
2006-10-31 15:55 ` Ben Greear
2006-10-31 18:22 ` Stephen Hemminger
2006-10-31 21:36 ` David Miller
2006-10-31 18:46 ` Michael Tokarev
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=20061031.013154.122620846.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peter.hicks@poggs.co.uk \
/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
Powered by JetHome