From: Scott Marlowe <scott.marlowe@gmail.com>
To: Roberto Edwins <robertoedwins@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Setting up of a large database
Date: Fri, 16 May 2008 14:18:02 -0600
Message-ID: <dcc563d10805161318o6b8ce38cn3301ee622bfe3a13@mail.gmail.com> (raw)
In-Reply-To: <97b70d40805161050w1c02e076o89253dc503d352ea@mail.gmail.com>
References: <97b70d40805161050w1c02e076o89253dc503d352ea@mail.gmail.com>
On Fri, May 16, 2008 at 11:50 AM, Roberto Edwins
<robertoedwins@gmail.com> wrote:
> What are the values that should go in postgresql.conf for a larga
> database, a couple of which tables shall contain over 100 million
> records?
Well, that really kind of depends. Is this a database to handle lots
of users with small bank style transactions? Or is it designed to
hold the text type content for millions of users but with only a
handful accessing it at once? Or maybe it's a reporting database with
lots of statistical data that will be accessed by one or two people at
a time but do huge ugly queries.
It really all kind of depends.
A good idea is to keep from setting max clients any higher than you
have to. Set shared_buffers around 25% of total memory to start, and
set work_mem to about 8M or so. Note that it's easy to use up a lot
of memory fast with higher work_mem settings because each sort / hash
agg etc can use up work_mem worth of memory. 100 users times 2 sorts
each would equal 8M*200 or 1600M with a setting of 8M work_mem.
Most importantly, make small incremental changes and benchmark with a
realistic load, it's the only way to be sure.
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: scott.marlowe@gmail.com, robertoedwins@gmail.com
Subject: Re: Setting up of a large database
In-Reply-To: <dcc563d10805161318o6b8ce38cn3301ee622bfe3a13@mail.gmail.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