pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dilek Küçük <dilekkucuk@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: max_files_per_process limit
Date: Mon, 10 Nov 2008 10:24:24 -0500
Message-ID: <6567.1226330664@sss.pgh.pa.us> (raw)
In-Reply-To: <5d5d98b30811100618v2c0f935fka3f7970b622d6760@mail.gmail.com>
References: <5d5d98b30811100618v2c0f935fka3f7970b622d6760@mail.gmail.com>

"=?ISO-8859-1?Q?Dilek_K=FC=E7=FCk?=" <dilekkucuk@gmail.com> writes:
> We have a database of about 62000 tables (about 2000 tablespaces) with an
> index on each table. Postgresql version is 8.1.

You should probably rethink that schema.  A lot of similar tables can be
folded into one table with an extra key column.  Also, where did you get
the idea that 2000 tablespaces would be a good thing?  There's really no
point in more than one per spindle or filesystem.

> Although after the initial inserts to about 32000 tables the subsequent
> inserts are considerable fast, subsequent inserts to more than 32000 tables
> are very slow.

This has probably got more to do with inefficiencies of your filesystem
than anything else --- did you pick one that scales well to lots of
files per directory?

> This seems to be due to the datatype (integer) of max_files_per_process
> option in the postgres.conf file which is used to set the maximum number of
> open file descriptors.

It's not so much the datatype of max_files_per_process as the datatype
of kernel file descriptors that's the limitation ...

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <6567.1226330664@sss.pgh.pa.us>
Permalink:  ../6567.1226330664@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6567.1226330664@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dilekkucuk@gmail.com
  Subject: Re: max_files_per_process limit
  In-Reply-To: <6567.1226330664@sss.pgh.pa.us>

* 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