All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Robin Holt <holt@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>,
	Vlad Yasevich <vladislav.yasevich@hp.com>,
	Sridhar Samudrala <sri@us.ibm.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-decnet-user@lists.sourceforge.net,
	linux-sctp@vger.kernel.org
Subject: Re: sysctl_{tcp,udp,sctp}_mem overflow on 16TB system.
Date: Fri, 01 Oct 2010 20:30:22 +0000	[thread overview]
Message-ID: <20101001203022.GA28486@1wt.eu> (raw)
In-Reply-To: <20101001193958.GP14068@sgi.com>

Hello Robin,

On Fri, Oct 01, 2010 at 02:39:58PM -0500, Robin Holt wrote:
> 
> On a 16TB system, we noticed that sysctl_tcp_mem[2] and sysctl_udp_mem[2]
> were negative.  Code review indicates that the same should occur with
> sysctl_sctp_mem[2].
> 
> There are a couple ways we could address this.  The one which appears most
> reasonable would be to change the struct proto defintion for sysctl_mem
> from an int to a long and handle all the associated fallout.
> 
> An alternative is to limit the calculation to 1/2 INT_MAX.  The downside
> being that the administrator could not tune the system to use more than
> INT_MAX memory when much more is available.
> 
> Is there a compelling reason to not change the structure's definition
> over to longs instead of ints and deal with the fallout from that change?

Could we not see it differently ? => is there any reason someone would
want to assign more than 8 TB of RAM to the network buffers in the near
future ? Even at 100 Gbps, that's still 10 minutes of traffic stuck in
buffers. Probably that the day we need that large buffers, Linux won't
support 32-bit systems anymore and all such limits will have switched
to 64-bit.

So probably that limiting the value to INT_MAX/2 sounds reasonable ?

Regards,
Willy


WARNING: multiple messages have this Message-ID (diff)
From: Willy Tarreau <w@1wt.eu>
To: Robin Holt <holt@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>,
	Vlad Yasevich <vladislav.yasevich@hp.com>,
	Sridhar Samudrala <sri@us.ibm.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-decnet-user@lists.sourceforge.net,
	linux-sctp@vger.kernel.org
Subject: Re: sysctl_{tcp,udp,sctp}_mem overflow on 16TB system.
Date: Fri, 1 Oct 2010 22:30:22 +0200	[thread overview]
Message-ID: <20101001203022.GA28486@1wt.eu> (raw)
In-Reply-To: <20101001193958.GP14068@sgi.com>

Hello Robin,

On Fri, Oct 01, 2010 at 02:39:58PM -0500, Robin Holt wrote:
> 
> On a 16TB system, we noticed that sysctl_tcp_mem[2] and sysctl_udp_mem[2]
> were negative.  Code review indicates that the same should occur with
> sysctl_sctp_mem[2].
> 
> There are a couple ways we could address this.  The one which appears most
> reasonable would be to change the struct proto defintion for sysctl_mem
> from an int to a long and handle all the associated fallout.
> 
> An alternative is to limit the calculation to 1/2 INT_MAX.  The downside
> being that the administrator could not tune the system to use more than
> INT_MAX memory when much more is available.
> 
> Is there a compelling reason to not change the structure's definition
> over to longs instead of ints and deal with the fallout from that change?

Could we not see it differently ? => is there any reason someone would
want to assign more than 8 TB of RAM to the network buffers in the near
future ? Even at 100 Gbps, that's still 10 minutes of traffic stuck in
buffers. Probably that the day we need that large buffers, Linux won't
support 32-bit systems anymore and all such limits will have switched
to 64-bit.

So probably that limiting the value to INT_MAX/2 sounds reasonable ?

Regards,
Willy


  reply	other threads:[~2010-10-01 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 19:39 sysctl_{tcp,udp,sctp}_mem overflow on 16TB system Robin Holt
2010-10-01 19:39 ` Robin Holt
2010-10-01 19:39 ` Robin Holt
2010-10-01 20:30 ` Willy Tarreau [this message]
2010-10-01 20:30   ` Willy Tarreau
2010-10-03  8:20   ` Maciej Żenczykowski
2010-10-03  8:20     ` Maciej Żenczykowski
2010-10-03 11:54     ` Robin Holt
2010-10-03 11:54       ` Robin Holt
2010-10-03 16:43     ` Willy Tarreau
2010-10-03 16:43       ` Willy Tarreau

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=20101001203022.GA28486@1wt.eu \
    --to=w@1wt.eu \
    --cc=davem@davemloft.net \
    --cc=holt@sgi.com \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-decnet-user@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    --cc=sri@us.ibm.com \
    --cc=vladislav.yasevich@hp.com \
    --cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.