Open file limits
julesa at pcf.com
Tue Jul 6 15:10:58 EDT 2004
> Hi, Can anyone share experiences with running out of open files on
> Linux? I am using a 2.4.26 kernel, and the system wide open file
> limit is rather large. Do I need to set anything other than this? The
> default limit of 1024 is in effect for both cyrus and root.
> Thanks. AJ
# cat /proc/sys/fs/file-nr
25301 1092 65532
The three numbers represent allocated filehandles, free fh, and max fh.
If cyrus needs more filehandles than max fh, the kernel will refuse to
give it any more, and you will get a "too many open files" error. The
above numbers are from a system with 375 concurrent imapd processes. If
allocated fh starts getting close to max fh, you need to increase the max.
The RedHat default max is pretty low (8192), at least it was when I was
running Cyrus on RedHat boxes (RH 7.2, 7.3). Maybe they've changed the
default since then. On Debian Woody systems, you have a little more room
by default (32768). This will all become moot with the 2.6 kernel, but
I'm not ready to run 2.6 on my production mail server yet. :-)
Add something like this to a boot script:
echo 65536 > /proc/sys/fs/file-max
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Pacific Coast Feather Co.
julesa at pcf.com x284
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus