pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Setting up of a large database
2+ messages / 2 participants
[nested] [flat]

* Setting up of a large database
@ 2008-05-16 17:50  Roberto Edwins <robertoedwins@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Roberto Edwins @ 2008-05-16 17:50 UTC (permalink / raw)
  To: pgsql-admin

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?

Thanks in advance.


- Roberto



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Setting up of a large database
@ 2008-05-16 20:18  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Roberto Edwins <robertoedwins@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Scott Marlowe @ 2008-05-16 20:18 UTC (permalink / raw)
  To: Roberto Edwins <robertoedwins@gmail.com>; +Cc: pgsql-admin

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-05-16 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 17:50 Setting up of a large database Roberto Edwins <robertoedwins@gmail.com>
2008-05-16 20:18 ` Scott Marlowe <scott.marlowe@gmail.com>

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