linux/Documentation
Eric Dumazet f86dcc5aa8 udp: dynamically size hash tables at boot time
UDP_HTABLE_SIZE was initialy defined to 128, which is a bit small for
several setups.

4000 active UDP sockets -> 32 sockets per chain in average. An
incoming frame has to lookup all sockets to find best match, so long
chains hurt latency.

Instead of a fixed size hash table that cant be perfect for every
needs, let UDP stack choose its table size at boot time like tcp/ip
route, using alloc_large_system_hash() helper

Add an optional boot parameter, uhash_entries=x so that an admin can
force a size between 256 and 65536 if needed, like thash_entries and
rhash_entries.

dmesg logs two new lines :
[    0.647039] UDP hash table entries: 512 (order: 0, 4096 bytes)
[    0.647099] UDP Lite hash table entries: 512 (order: 0, 4096 bytes)

Maximal size on 64bit arches would be 65536 slots, ie 1 MBytes for non
debugging spinlocks.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 22:00:22 -07:00
..
2009-04-07 08:12:38 +02:00
2007-07-19 10:04:47 -07:00
2008-02-14 00:16:13 -05:00
2008-10-16 11:21:30 -07:00
2009-06-22 10:12:35 +01:00
2008-02-03 15:54:28 +02:00
2009-10-04 22:53:45 +02:00
2009-09-20 12:27:42 +02:00
2009-09-10 10:46:55 +03:00
2008-01-11 18:22:30 -06:00
2007-05-09 08:57:56 +02:00
2005-04-16 15:20:36 -07:00
2009-06-18 13:04:04 -07:00
2009-08-23 10:32:40 +02:00
2008-04-29 02:49:47 -04:00
2006-11-30 04:58:40 +01:00
2009-09-23 06:46:41 -07:00
2009-10-04 22:53:41 +02:00
2008-12-03 16:09:53 -07:00
2008-07-25 10:53:30 -07:00
2008-11-12 17:17:18 -08:00
2007-10-19 11:53:34 -07:00
2008-11-14 10:39:26 +11:00
2009-09-15 17:04:38 -07:00
2006-11-30 04:58:40 +01:00
2009-09-23 07:39:48 -07:00
2008-03-24 19:22:19 -07:00
2005-04-16 15:20:36 -07:00
2007-10-18 14:37:32 -07:00
2005-04-16 15:20:36 -07:00
2009-07-01 22:36:22 +02:00
2009-08-28 15:21:12 -04:00
2008-10-20 15:43:10 +02:00
2009-04-27 12:00:27 -07:00
2009-04-27 12:00:27 -07:00
2008-08-12 16:07:30 -07:00
2009-03-31 15:18:37 +11:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-11-12 17:17:17 -08:00
2006-06-27 17:32:47 -07:00
2005-04-16 15:20:36 -07:00
2005-06-21 18:46:32 -07:00
2005-04-16 15:20:36 -07:00
2009-04-14 09:00:23 +10:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00