Skip to contentSkip to conversation

fs.file-max

DISCUSSION Dan Kegel 2 participants 2 messages May 8, 2001

lore
Share & tools
lore

Dan Kegel

author
#0 lore raw
Quoted 4 lines · Federico Edelman Anaya

What can I do to test the FD limit? ... Because, the FD limit is set in /proc/sys/fs/file-max, sample:

echo "2048" > /proc/sys/fs/file-max

That sets the systemwide limit to 2048.

Quoted 1 line

ulimit -n 8192

That sets the per-process limit (for this process and its children) to 2048.

Quoted 2 lines

In this case ... the FD limit = 8192 :( ... when the limit should be 2048?

No, the two limits are independant (except, obviously, that that process will reach the systemwide fd limit before it exhausts its per-process fd limit).

Quoted 2 lines

I wrote a perl script for the test ... anybody known a "C" program for test the FD limit?

http://www.kegel.com/dkftpbench/#tuning

- Dan

#1 lore raw

Dan:

    Hi ...
Quoted 8 lines · Dan Kegel
Quoted 4 lines · Federico Edelman Anaya

What can I do to test the FD limit? ... Because, the FD limit is set in /proc/sys/fs/file-max, sample:

echo "2048" > /proc/sys/fs/file-max

That sets the systemwide limit to 2048.

Ok ...

Quoted 7 lines
Quoted 3 lines

ulimit -n 8192

That sets the per-process limit (for this process and its children) to 2048.

But, my perl script could open 8192 files ... I don't understand exactly work ... which is the limit of FD? file-max?

Quoted 14 lines
Quoted 3 lines

In this case ... the FD limit = 8192 :( ... when the limit should be 2048?

No, the two limits are independant (except, obviously, that that process will reach the systemwide fd limit before it exhausts its per-process fd limit).

Quoted 2 lines

I wrote a perl script for the test ... anybody known a "C" program for test the FD limit?

http://www.kegel.com/dkftpbench/#tuning

- Dan