All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@nokia.com>
To: ext John Masinter <johnmasinter@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: More than 1M open file descriptors
Date: Wed, 19 May 2010 18:36:05 +0300	[thread overview]
Message-ID: <20100519153605.GA5221@nokia.com> (raw)
In-Reply-To: <AANLkTim5Yuvga5kwOFUaUgxbxzvkD9gyqiEUCN6nTs5b@mail.gmail.com>

On Wed, May 19, 2010 at 04:52:56PM +0200, ext John Masinter wrote:
>I'm a software engineer and work with a fortune-500 company. We have a
>line of linux-powered network security appliances and I am responsible
>for Linux / OS development.
>Our multi-core appliance handles a large number of low-bandwith tcp
>connections, and after years of performance streamlining, we have hit
>the kernel's million tcp connection limit.
>Is there a kernel hack to increase the file descriptor limit beyond 1M
>to that we may have more than 1M open tcp connections? If this is
>discussed elsewhere, please point me in the right direction. Many
>thanks to everyone that contributes to open source.

look into fs/file.c
increasing sysctl_nr_open like below should help:

diff --git a/fs/file.c b/fs/file.c
index 87e1290..23c83df 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -27,9 +27,9 @@ struct fdtable_defer {
  	struct fdtable *next;
  };
  
-int sysctl_nr_open __read_mostly = 1024*1024;
+int sysctl_nr_open __read_mostly = 4*1024*1024;
  int sysctl_nr_open_min = BITS_PER_LONG;
-int sysctl_nr_open_max = 1024 * 1024; /* raised later */
+int sysctl_nr_open_max = 4 * 1024 * 1024; /* raised later */
  
  /*
   * We use this list to defer free fdtables that have vmalloced

you can also do it via /proc AFAICT.

-- 
balbi

DefectiveByDesign.org

      parent reply	other threads:[~2010-05-19 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 14:52 More than 1M open file descriptors John Masinter
2010-05-19 15:26 ` Eric Dumazet
2010-05-19 15:36 ` Felipe Balbi [this message]

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=20100519153605.GA5221@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=johnmasinter@gmail.com \
    --cc=linux-kernel@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 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.