Not signed in (Sign In)

LiveSearch

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorprasana
    • CommentTimeSep 5th 2007
     
    FS type: ext3
    Debian 4.0 etch
    1. is fs.file-max the sysctl that controls that ?
    2. does changing that value require a reboot or a newfs ?

    thanks,
    -prasana
    • CommentAuthormarius
    • CommentTimeSep 5th 2007
     
    Prasana: to answer your question to my knowledge there is no limit on the number of files a directory can hold on most recent linux kernels. Obviously there will be a performance penalty in having thousands of files in a single directory and a good policy would be to split them into several subdirectories (direct access should not be slower, but operations that will list all files - like ls, rsync, etc. - will suffer the most). There might be FS limits, but in the ext3 case again I am not aware of such limitation.

    1. fs.file-max - is a system wide setting controlling the maximum number of concurrently open file descriptors throughout the system. The default is guessed by the kernel based on the particular system hardware (RAM) and you can inspect the current setting with:
    cat /proc/sys/fs/file-max
    or:
    sysctl fs.file-max
    2. Normally the default guessed is more than enough, but in case you need to change it it will not require anything special like a reboot and will become instantly active (just don't forget to add it to sysctl.conf or rc.local to be kept after reboot).

    ps. per-process (and user) file descriptor limits are controlled by ulimit (check with ulimit -n) and normally this defaults (even for root) to 1024 in most distributions including debian. You can increase this on debian by adding to /etc/security/limits.conf whatever higher value you need:
    * soft nofile 4096
    * hard nofile 4096

    (or the same for individual users).

    I hope this answers your question :-).

    Regards,
    - Marius -
Add your comments

    Username Password
  • Format comments as