From: Andrew Burgess <aab@cichlid.com>
To: linux-kernel@vger.kernel.org
Subject: /proc/sys/fs/file-max broken in 2.4.22-pre5
Date: Sun, 13 Jul 2003 15:31:54 -0700 [thread overview]
Message-ID: <200307132231.h6DMVs916407@athlon.cichlid.com> (raw)
Setting /proc/sys/fs/file-max to 60000 results in a max of 1024 file
handles. In 2.4.21-rc7-ac1 and random earlier kernels this works as expected.
---------------------------------------------------------------------------
root@athlon:/root # cat file-max.c
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
main() {
int i = 0;
struct rlimit r;
getrlimit(RLIMIT_NOFILE, &r);
r.rlim_cur = 50000;
setrlimit(RLIMIT_NOFILE, &r);
while(1) {
if(fopen("/tmp/file-max-test", "w") == 0) {
perror("");
break;
}
i++;
}
printf("opened %d files\n", i);
}
root@athlon:/root # echo 60000 > /proc/sys/fs/file-max
root@athlon:/root # cc file-max.c
root@athlon:/root # a.out
Too many open files
opened 1021 files
root@athlon:/root # uname -a
Linux athlon 2.4.22-pre5 #2 SMP Sun Jul 13 12:38:04 PDT 2003 i686 unknown
next reply other threads:[~2003-07-13 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-13 22:31 Andrew Burgess [this message]
2003-07-14 7:16 ` /proc/sys/fs/file-max broken in 2.4.22-pre5 Willy Tarreau
-- strict thread matches above, loose matches on Subject: below --
2003-07-14 20:11 Andrew Burgess
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=200307132231.h6DMVs916407@athlon.cichlid.com \
--to=aab@cichlid.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.