linux/net
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
..
9p [9P]: Fix missing unlock before return in p9_mux_poll_start 2007-10-23 21:27:54 -07:00
802 [NET]: Move hardware header operations out of netdevice. 2007-10-10 16:52:52 -07:00
8021q [8021Q]: transfer dev_id from real device 2007-10-10 16:54:56 -07:00
appletalk [NET]: sparse warning fixes 2007-10-10 16:54:48 -07:00
atm [BR2684]: get rid of broken header code. 2007-10-17 19:39:22 -07:00
ax25 Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
bluetooth [Bluetooth] Convert RFCOMM to use kthread API 2007-10-22 02:59:49 -07:00
bridge Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
core [NET]: Fix race between poll_napi() and net_rx_action() 2007-10-29 22:37:28 -07:00
dccp [CCID2/3]: Initialisation assignments of 0 are redundant 2007-10-24 10:53:01 -02:00
decnet [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
econet [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
ethernet [NET]: Validate device addr prior to interface-up 2007-10-23 21:27:50 -07:00
ieee80211 SG: Change sg_set_page() to take length and offset argument 2007-10-24 11:20:47 +02:00
ipv4 [TCP]: Saner thash_entries default with much memory. 2007-10-30 00:59:25 -07:00
ipv6 [TCP] MD5: Remove some more unnecessary casting. 2007-10-29 22:37:27 -07:00
ipx [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
irda [IRDA]: Make ircomm_tty static. 2007-10-26 03:56:43 -07:00
iucv Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
key [IPSEC]: Lock state when copying non-atomic fields to user-space 2007-10-10 16:55:02 -07:00
lapb [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
llc Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
mac80211 [PATCH] mac80211: fix printk warning on 64-bit 2007-10-26 00:14:29 -04:00
netfilter [NETFILTER]: nf_ct_alloc_hashtable(): use __GFP_NOWARN 2007-10-29 22:37:31 -07:00
netlabel [NetLabel]: correct usage of RCU locking 2007-10-26 04:29:08 -07:00
netlink [NET]: Marking struct pernet_operations __net_initdata was inappropriate 2007-10-26 22:54:53 -07:00
netrom [NET]: Move hardware header operations out of netdevice. 2007-10-10 16:52:52 -07:00
packet [PACKET]: Kill unused pg_vec_endpage() function 2007-10-18 21:58:19 -07:00
rfkill get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
rose [NET]: Move hardware header operations out of netdevice. 2007-10-10 16:52:52 -07:00
rxrpc [CRYPTO] users: Fix up scatterlist conversion errors 2007-10-27 00:52:07 -07:00
sched [NET_CLS_ACT]: Use skb_act_clone 2007-10-26 02:47:54 -07:00
sctp SCTP endianness annotations regression 2007-10-29 07:41:32 -07:00
sunrpc [SUNRPC] rpc_rdma: we need to cast u64 to unsigned long long for printing 2007-10-30 00:44:32 -07:00
tipc [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
unix pid namespaces: changes to show virtual ids to user 2007-10-19 11:53:40 -07:00
wanrouter [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
wireless Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
x25 [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
xfrm [IPSEC]: Fix scatterlist handling in skb_icv_walk(). 2007-10-26 00:39:27 -07:00
Kconfig [NET]: Add network namespace clone & unshare support. 2007-10-10 16:52:46 -07:00
Makefile 9p: Reorganization of 9p file system code 2007-07-14 15:13:40 -05:00
TUNABLE
compat.c O_CLOEXEC for SCM_RIGHTS 2007-07-16 09:05:45 -07:00
nonet.c
socket.c [NET]: Fix error reporting in sys_socketpair(). 2007-10-29 22:37:34 -07:00
sysctl_net.c