All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Time to change NR_OPEN value
Date: Mon, 31 Jan 2005 15:41:31 +0100	[thread overview]
Message-ID: <41FE439B.6080500@cosmosbay.com> (raw)
In-Reply-To: <41FE2C63.mailD8U11TTK4@phoenix.one.melware.de>

Time has come to change NR_OPEN value, some production servers hit the 
not so 'ridiculously high value' of 1024*1024 file descriptors per process.

AFAIK this is safe to raise this value, because alloc_fd_array() uses 
vmalloc() for large arrays and vmalloc() returns NULL  if a too large 
allocation is attempted (or in case of memory shortage)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

diff -Nru /tmp/fs.h include/linux/fs.h
--- linux.orig/include/linux/fs.h   2005-01-31 15:28:01.926685144 +0100
+++ inux/include/linux/fs.h  2005-01-31 15:29:37.047224624 +0100
@@ -32,7 +32,8 @@
   * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
   * the file limit at runtime and only root can increase the per-process
   * nr_file rlimit, so it's safe to set up a ridiculously high absolute
- * upper limit on files-per-process.
+ * upper limit on files-per-process. Actual limit depends on vmalloc()
+ * constraints.
   *
   * Some programs (notably those using select()) may have to be
   * recompiled to take full advantage of the new limits..
@@ -40,7 +41,7 @@

  /* Fixed constants first: */
  #undef NR_OPEN
-#define NR_OPEN (1024*1024)    /* Absolute upper limit on fd num */
+#define NR_OPEN (16*1024*1024) /* Absolute upper limit on fd num */
  #define INR_OPEN 1024          /* Initial setting for nfile rlimits */

  #define BLOCK_SIZE_BITS 10


      reply	other threads:[~2005-01-31 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31 13:02 [PATCH 1/3] 2.6 ISDN Eicon driver: add missing uaccess Armin Schindler
2005-01-31 14:41 ` Eric Dumazet [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=41FE439B.6080500@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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.