From: Herve Eychenne <rv@wallfire.org>
To: Harald Welte <laforge@netfilter.org>,
Netfilter Development <netfilter-devel@lists.netfilter.org>
Subject: Re: RAM and conntrack performance: first draft of the document is online
Date: Thu, 27 Nov 2003 04:33:52 +0100 [thread overview]
Message-ID: <20031127033351.GC1084@eychenne.org> (raw)
In-Reply-To: <20031126113645.GF3121@obroa-skai.de.gnumonks.org>
On Wed, Nov 26, 2003 at 12:36:45PM +0100, Harald Welte wrote:
> On Wed, Nov 26, 2003 at 04:42:32AM +0100, Herve Eychenne wrote:
> > Yes, but that is really negligible (2 * size_of_pointer * HASHSIZE).
> well, sizof(void *) is 4 bytes on most archs... two times is 8. so if
> you have let's say 100k buckets, that's 800k non-swappable kernel
> memory...
Which is really not that much when you have 512 MB... (0.0015 %)
> > > maybe you're running a different kernel?
> > Debian standard kernel. Maybe they are patching netfilter? These are smart
> > guys! ;-)
> IIRC debian has still 2.4.18 which had a different hashing algorithm
Standard Debian stable, maybe. But you may want to run testing, or
sid, and I run testing (sarge), so I have a 2.4.22.
> > > no, there are none deleted. we just skip creating new ones until the
> > > number has dropped below the limit. There is no special case for that,
> > > we just chek >= conntrack_max at conntrack allocation time.
> > Don't you think it would be good to shrink the lists immediately?
> > Waiting til the number has dropped below the limit can take days...
> well, it might be a good idea. but I somehow doubt this is a valid
> scenario. And if we would shrink the list: how do we select which
> entries to evict?
That seems relatively simple to me:
- reduce timeouts on every entries proportionally
- sort the entries by order of importance (state, timeout (time to
live), protocol (icmp ping/pong, udp, tcp), maybe unprivileged ports
matter less, etc.). Then evict "bad scores" first.
> I'd rather wait for ctnetlink to appear in mainstream
> kernels and then leave that to a userspace process.
Maybe such a job (probably happening while network is stressed) is
better done in kernel space? That doesn't seem so complicated...
Herve
--
_
(°= Hervé Eychenne
//)
v_/_ WallFire project: http://www.wallfire.org/
next prev parent reply other threads:[~2003-11-27 3:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 15:10 RAM and conntrack performance Herve Eychenne
2003-11-03 8:12 ` Harald Welte
2003-11-25 15:35 ` Herve Eychenne
2003-11-25 20:57 ` Harald Welte
2003-11-26 3:42 ` RAM and conntrack performance: first draft of the document is online Herve Eychenne
2003-11-26 4:13 ` Henrik Nordstrom
2003-11-27 4:56 ` Herve Eychenne
2003-11-28 11:00 ` Willy Tarreau
2003-11-26 11:36 ` Harald Welte
2003-11-26 16:26 ` Patrick McHardy
2003-11-27 11:10 ` Harald Welte
2003-11-27 3:33 ` Herve Eychenne [this message]
2003-11-27 9:56 ` Henrik Nordstrom
2003-11-30 22:25 ` Harald Welte
2003-11-27 4:14 ` [PATCH] Re: hashsize available through /proc was " Herve Eychenne
2003-11-27 10:09 ` Henrik Nordstrom
2003-11-27 10:13 ` Henrik Nordstrom
2003-11-27 11:38 ` Herve Eychenne
2003-11-27 11:57 ` Henrik Nordstrom
2003-11-27 11:14 ` Harald Welte
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=20031127033351.GC1084@eychenne.org \
--to=rv@wallfire.org \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.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 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.