From e52c1f17e4ea8e61bd26eb25f1a184202693c2b9 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 18 Jun 2005 22:49:40 -0700 Subject: [NET]: Move sysctl_max_syn_backlog into request_sock.c This fixes the CONFIG_INET=n build failure noticed by Andrew Morton. Signed-off-by: David S. Miller --- net/core/request_sock.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'net/core/request_sock.c') diff --git a/net/core/request_sock.c b/net/core/request_sock.c index 78fd60a46bf2..bb55675f0685 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c @@ -18,6 +18,22 @@ #include +/* + * Maximum number of SYN_RECV sockets in queue per LISTEN socket. + * One SYN_RECV socket costs about 80bytes on a 32bit machine. + * It would be better to replace it with a global counter for all sockets + * but then some measure against one socket starving all other sockets + * would be needed. + * + * It was 128 by default. Experiments with real servers show, that + * it is absolutely not enough even at 100conn/sec. 256 cures most + * of problems. This value is adjusted to 128 for very small machines + * (<=32Mb of memory) and to 1024 on normal or better ones (>=256Mb). + * Further increasing requires to change hash table size. + */ +int sysctl_max_syn_backlog = 256; +EXPORT_SYMBOL(sysctl_max_syn_backlog); + int reqsk_queue_alloc(struct request_sock_queue *queue, const int nr_table_entries) { -- cgit v1.2.3-59-g8ed1b