Re: Shared buffers vs large files

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: Glen Parker <glenebob(at)nwlink(dot)com>
Cc: Pg-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Shared buffers vs large files
Date: 2002-03-02 00:13:41
Message-ID: 1015028021.4008.15.camel@jiro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2002-03-01 at 18:57, Glen Parker wrote:
> > shared_buffers at 4096 (32MB if my calculations are correct),
> > sort_mem = 65536 # min 32
> > vacuum_mem = 16384 # min 1024
> >
> > The machine has 1GB of ram.
> >
> > I don't expect to have more than a handfull of connections at a time (from
> > 1 to 10). Should I increate the shared buffers to 64MB? 128MB?
>
> On a 1GB machine (still PG 7.1.3) I'm currently running:
>
> shared_buffers: 48000 (about 400MB)
> sort_mem: 8192
>
> I haven't done much testing with sort_mem values, but...
>
> This is very very VERY unscientific, but I haven't seen a shared_buffers
> value that is so big that it seems to hurt performance (unless it causes
> swapping obviously), and my installation is dedicated to postgres so I don't
> need the memory for much of anything else.

Keep in mind that this memory is allocated by Postgres on postmaster
startup. Thus, the kernel can't use it for I/O buffers. Depending on
what UNIX variant you're running and the kind of load the box is under,
setting shared_buffers that high may or may not be a performance win.

However, I agree with you in principle: for a production PostgreSQL
server, the default shared_buffers settings are ridiculously small.

Another parameter to consider increasing is wal_buffers; in my
experience that can improve performance as well.

Cheers,

Neil

--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lee Harr 2002-03-02 00:38:48 Re: Newbie question re SQL
Previous Message Martin Dillard 2002-03-02 00:10:47 PostgreSQL profiling tools