pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@ihs.com>
To: jade <jade@vanzoest.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: postgresql 7.1 file descriptor
Date: Wed, 8 May 2002 11:21:49 -0600 (MDT)
Message-ID: <Pine.LNX.4.33.0205081112080.20291-100000@css120.ihs.com> (raw)
In-Reply-To: <20020507152551.M65365-100000@vision.estjohn.com>

On Tue, 7 May 2002, jade wrote:

> 
> Hi,
> 
> 
> I am running postgresql - 7.1 on Redhat 2.2.16-22 kernel.
> Sometimes this the system becomes totally unusable with
> "VFS: file-max limit 4096 reached" error?  The system is setup to have
> 4096 file descriptor as default.  I was wondering how many file descriptor
> does postgres open per backend process?

I think it depends on what those backends are doing.  I just ran a pgbench 
-c 100 -t 10 on my machine, and went from "2253    712     8192" in 
/proc/sys/fs/file-nr to "5316    3825    8192" in the same file.

According to /usr/src/linux-2.4/Documentation/sysctl/fs.txt on my machine, 
the first number is the number of file handles allocated, the second is 
the number in use, and the third is the max.

So, running 100 simos on my personal workstation used about 3000 file 
handles allocated, with about the same number showing use.

To easiest way to change these settings is through the use of sysctl.  If 
your machine doesn't have sysctl installed, find it and install it, it's a 
VERY easy way to change system / kernel settings.

After install, look at man sysctl for more info.

East explanation, sysctl -a shows all settings, sysctl -p process and sets 
all settings found in /etc/sysctl.conf

On production servers, the number for file-max is often set to 32768 or 
higher (on our big boxes we have it set to 65536 and often see usage of 
well over 20000 under load.)




view thread (5+ messages)  latest in thread

Message-ID: <Pine.LNX.4.33.0205081112080.20291-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0205081112080.20291-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0205081112080.20291-100000@css120.ihs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@ihs.com, jade@vanzoest.com, pgsql-hackers@postgresql.org
  Subject: Re: postgresql 7.1 file descriptor
  In-Reply-To: <Pine.LNX.4.33.0205081112080.20291-100000@css120.ihs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox