Re: Too many open files! how do I fix on linux?

Lists: pgsql-general
From: adb <adb(at)Beast(dot)COM>
To: pgsql-general(at)postgresql(dot)org
Subject: Too many open files! how do I fix on linux?
Date: 2001-01-27 03:23:51
Message-ID: Pine.GSO.4.10.10101261918090.2561-100000@hairdini.beast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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.


From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: adb <adb(at)Beast(dot)COM>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Too many open files! how do I fix on linux?
Date: 2001-01-27 04:20:10
Message-ID: Pine.BSO.4.10.10101262319220.7630-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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)


From: "Tim Barnard" <tbarnard(at)povn(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Too many open files! how do I fix on linux?
Date: 2001-01-27 19:29:36
Message-ID: 003d01c08897$7bec5920$a519af3f@hartcomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

<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


From: Martin Tomes <martin(dot)tomes(at)controls(dot)eurotherm(dot)co(dot)uk>
To: "Tim Barnard" <tbarnard(at)povn(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Too many open files! how do I fix on linux?
Date: 2001-01-29 09:29:42
Message-ID: uwvbeln95.fsf@martin.controls.eurotherm.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

>>>>> "Tim" == Tim Barnard <tbarnard(at)povn(dot)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(dot)Tomes(at)controls(dot)eurotherm(dot)co(dot)uk