kernel_optimize_test/net/ipv4
Jean Delvare 0ccfe61803 [TCP]: Saner thash_entries default with much memory.
On systems with a very large amount of memory, the heuristics in
alloc_large_system_hash() result in a very large TCP established hash
table: 16 millions of entries for a 128 GB ia64 system. This makes
reading from /proc/net/tcp pretty slow (well over a second) and as a
result netstat is slow on these machines. I know that /proc/net/tcp is
deprecated in favor of tcp_diag, however at the moment netstat only
knows of the former.

I am skeptical that such a large TCP established hash is often needed.
Just because a system has a lot of memory doesn't imply that it will
have several millions of concurrent TCP connections. Thus I believe
that we should put an arbitrary high limit to the size of the TCP
established hash by default. Users who really need a bigger hash can
always use the thash_entries boot parameter to get more.

I propose 2 millions of entries as the arbitrary high limit. This
makes /proc/net/tcp reasonably fast on the system in question (0.2 s)
while being still large enough for me to be confident that network
performance won't suffer.

This is just one way to limit the hash size, there are others; I am not
familiar enough with the TCP code to decide which is best. Thus, I
would welcome the proposals of alternatives.

[ 2 million is still too large, thus I've modified the limit in the
  change to be '512 * 1024'. -DaveM ]

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 00:59:25 -07:00
..
ipvs [IPVS]: use proper timeout instead of fixed value 2007-10-29 22:37:23 -07:00
netfilter
af_inet.c
ah4.c
arp.c
cipso_ipv4.c [NetLabel]: correct usage of RCU locking 2007-10-26 04:29:08 -07:00
datagram.c
devinet.c
esp4.c [CRYPTO] users: Fix up scatterlist conversion errors 2007-10-27 00:52:07 -07:00
fib_frontend.c [IPV4]: Explicitly call fib_get_table() in fib_frontend.c 2007-10-23 21:27:58 -07:00
fib_hash.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
icmp.c [INET]: Unexport icmpmsg_statistics 2007-10-26 04:06:08 -07:00
igmp.c
inet_connection_sock.c
inet_diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
inet_fragment.c
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ip_input.c
ip_options.c
ip_output.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ip_sockglue.c
ipcomp.c
ipconfig.c
ipip.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ipmr.c
Kconfig typo fixes 2007-10-20 01:34:40 +02:00
Makefile
netfilter.c
proc.c [IPv4] SNMP: Refer correct memory location to display ICMP out-going statistics 2007-10-29 22:37:36 -07:00
protocol.c
raw.c
route.c
syncookies.c
sysctl_net_ipv4.c
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c [TCP]: fix D-SACK cwnd handling 2007-10-26 04:27:59 -07:00
tcp_ipv4.c [TCP] MD5: Remove some more unnecessary casting. 2007-10-29 22:37:27 -07:00
tcp_lp.c
tcp_minisocks.c
tcp_output.c
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c [TCP] vegas: Fix a bug in disabling slow start by gamma parameter. 2007-10-29 22:37:25 -07:00
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c [TCP]: Saner thash_entries default with much memory. 2007-10-30 00:59:25 -07:00
tunnel4.c
udp_impl.h
udp.c [UDP]: Make use of inet_iif() when doing socket lookups. 2007-10-25 18:54:46 -07:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c