Re: Volunteer to build a configuration tool

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Volunteer to build a configuration tool
Date: 2007-06-27 23:19:45
Message-ID: 200706271619.45834.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-performance

Lance,

> I have a PostgreSQL database that runs on a dedicated server. The
> server has 24Gig of memory. What would be the max size I would ever
> want to set the shared_buffers to if I where to relying on the OS for
> disk caching approach? It seems that no matter how big your dedicated
> server is there would be a top limit to the size of shared_buffers.

There's not, actually. Under some circumstances (mainly Solaris 10 + UFS
on AMD) it can actually be beneficial to have s_b be 80% of RAM and bypass
the FS cache entirely. This isn't usually the case, but it's not to be
ruled out.

If you're relying on the FS cache and not using direct I/O, though, you
want to keep at least 50% of memory free for use by the cache. At below
50%, you lose a significant part of the benefit of the cache without
losing the cost of it. Of course, that assumes that your database is
bigger than ram; there isn't much need to have either s_b or the f.s.c. be
more than twice the size of your whole database.

In general, a setting s_b to 25% of RAM on a dedicated machine, and 10%
(with a max of 512MB) on a shared machine, is a nice safe default which
will do OK for most applications.

--
--Josh

Josh Berkus
PostgreSQL @ Sun
San Francisco

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Susanne Ebrecht 2007-06-28 11:31:17 rename of a view
Previous Message Gregory Stark 2007-06-26 08:01:59 Re: Volunteer to build a configuration tool

Browse pgsql-performance by date

  From Date Subject
Next Message Evan Reiser 2007-06-28 00:38:11 High IOWAIT times, low iops? Need Help with configuration
Previous Message Josh Berkus 2007-06-27 18:02:35 Re: PostgreSQL Configuration Tool for Dummies