Обсуждение: Too many open files! how do I fix on linux?
Hi again, I'm getting stuff like ERROR: cannot write block 1056 of tradehistory [testdb] blind: Too many open files in system and postmaster: StreamConnection: accept: Too many open files in system I understand that I need to up the max number of open files in the linux kernel but I'd like to know what's a good number to set it to for a high traffic postgres server and what's the best way to set it in linux so it's permanent? (These are during some performance tests I'm running with about 40 simultaneous clients) Thanks, Alex.
On Fri, 26 Jan 2001, adb wrote: > I understand that I need to up the max number of open files in the linux > kernel but I'd like to know what's a good number to set it to for a high > traffic postgres server and what's the best way to set it in linux so > it's permanent? I set to 16384. with about 100 clients this seems to be enough. Best way to set it is in your local rc script (/etc/rc.d/rc3.d/*local) > (These are during some performance tests I'm running with about 40 > simultaneous clients)
<snip> > I set to 16384. with about 100 clients this seems to be enough. > Best way to set it is in your local rc script (/etc/rc.d/rc3.d/*local) <snip> How do you go about doing this on a RedHat 6.2 system? There is an S99local file but nothing in it on setting maximum open files. Tim
>>>>> "Tim" == Tim Barnard <tbarnard@povn.com> writes: Tim> <snip> >> I set to 16384. with about 100 clients this seems to be enough. Best >> way to set it is in your local rc script (/etc/rc.d/rc3.d/*local) Tim> <snip> Tim> How do you go about doing this on a RedHat 6.2 system? There is an Tim> S99local file but nothing in it on setting maximum open files. I had to do this last week. On RedHat 6.2 put this at the end of /etc/rc.d/rc.local: echo 8192 > /proc/sys/fs/file-max echo 32768 > /proc/sys/fs/inode-max It increases file handles to 8192, you are supposed to have four times as many inode handles as file handles so it increases those too. -- Martin Tomes Martin.Tomes@controls.eurotherm.co.uk