netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hagen@jauu.net
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH 1/2] socket: increase default maximum listen queue length
Date: Wed, 30 Mar 2011 22:52:54 -0700 (PDT)	[thread overview]
Message-ID: <20110330.225254.104054904.davem@davemloft.net> (raw)
In-Reply-To: <1301077899-16482-1-git-send-email-hagen@jauu.net>

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Mar 2011 19:31:38 +0100

> sysctl_max_syn_backlog on the other hand provides similar functionality:
> provides a system wide upper limit of request sockets per listen socket.
> But sysctl_max_syn_backlog provides a more accurate value by considerate
> the actual memory situation of the system. 256 by default, 128 for
> systems with low memory and up to 1024 for larger systems.

sysctl_max_syn_backlog is not "256 by default", the calculation is:

	cnt = tcp_hashinfo.ehash_mask + 1;
 ...
	sysctl_max_syn_backlog = max(128, cnt / 256);

And I think we should leave the SOMAXCONN define alone (it's a
historic relic for userspace, and any sane server passes something
like ~0 into listen()).

And calculate the somaxconn sysctl at run time using a similar
formula to that used by sysctl_max_syn_backlog.

  parent reply	other threads:[~2011-03-31  5:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 18:31 [PATCH 1/2] socket: increase default maximum listen queue length Hagen Paul Pfeifer
2011-03-25 18:31 ` [PATCH 2/2] socket: add minimum listen queue length sysctl Hagen Paul Pfeifer
2011-03-25 20:24   ` Rick Jones
2011-03-25 23:51     ` Hagen Paul Pfeifer
2011-03-26  0:21       ` Rick Jones
2011-03-26  7:06       ` Eric Dumazet
2011-03-31  5:52 ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-20 12:14 [PATCH] socket: increase default maximum listen queue length Hagen Paul Pfeifer
2011-03-20 23:04 ` [PATCH 1/2] " Hagen Paul Pfeifer
2011-03-20 23:09   ` David Miller
2011-03-20 23:52     ` Hagen Paul Pfeifer
2011-03-21  0:18       ` David Miller
2011-03-20 23:57     ` Hagen Paul Pfeifer

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=20110330.225254.104054904.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hagen@jauu.net \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).