From: Herve Eychenne <rv@wallfire.org>
To: Netfilter Development <netfilter-devel@lists.netfilter.org>
Subject: RAM and conntrack performance
Date: Tue, 28 Oct 2003 16:10:32 +0100 [thread overview]
Message-ID: <20031028151032.GD726@eychenne.org> (raw)
Hi everyone,
Can someone post a state of the art summary for netfilter conntrack
(and maybe NAT) performance tweaking?
The only things I'm currently aware of are:
- modprobe ip_conntrack hashsize=$HASHSIZE
- echo $CONNTRACK_MAX > /proc/sys/net/ipv4/ip_conntrack_max
I think it would be good to end up with a small document which would
give every detail about how to choose optimal values for HASHSIZE and
CONNTRACK_MAX, and every other mean to get the best out of the
conntracking/NAT system...
Here are things I've collected so far, that it would be good to have
in this little document. I have questions, also:
- CONNTRACK_MAX and HASHSIZE get default values at boot time.
By default, CONNTRACK_MAX = n * 64, where n is the RAM size in MB,
am I right?
What about HASHSIZE default value? How to read it at runtime?
What is the exact link between these 2 values?
- HASHSIZE should be an odd number, and even better: a prime number.
What happens when you set it to an even number, or a non-prime number?
Why enable people to set even and non-prime numbers at all?
- Default values are "reasonnable" for a typical host, but we may
increase them on high-loaded firewalling-only systems, right?
Which values are the "best"? I.e., can someone give a formula with
this potential parameters (if pertinent):
- total RAM size
- size of the memory that should be left for non-conntrack data in
the kernel and userspace in general (what is a reasonnable value for
a firewall doing only firewalling with very few applications
running, and how to measure that at runtime?)
- number of rules, connections rate, etc.
- CONNTRACK_MAX can be modified at run time with /proc. What does it
do exactly (when shinked, when extended)?
When you modify CONNTRACK_MAX, should you also modify HASHSIZE
accordingly? Why? How?
- Is it possible to modify HASHSIZE at runtime when ip_conntrack is
not compiled as a module? If not, shouldn't we enable this with
/proc, like CONNTRACK_MAX?
- Does any of these operations currently (or possibly, if soon
implemented) lead to some rehashing at runtime?
I suppose it would be quite slow... How long does/would it take?
How to proceed to keep current conntrack entries at runtime as much
as possible? (I suppose unloading ip_conntrack module and
reinserting it with another hashsize value clears the table...)
Please comment...
Herve
--
_
(°= Hervé Eychenne
//)
v_/_ WallFire project: http://www.wallfire.org/
next reply other threads:[~2003-10-28 15:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 15:10 Herve Eychenne [this message]
2003-11-03 8:12 ` RAM and conntrack performance 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
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=20031028151032.GD726@eychenne.org \
--to=rv@wallfire.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.