Re: Shared_buffers hint

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Rafael Domiciano" <rafael(dot)domiciano(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Shared_buffers hint
Date: 2008-10-06 13:42:36
Message-ID: dcc563d10810060642m175af9ddt7240e065b1b6d53@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Oct 6, 2008 at 5:52 AM, Rafael Domiciano
<rafael(dot)domiciano(at)gmail(dot)com> wrote:
> HI people,
> I'm tuning a server that is a long time abandoned, and this server is a
> little slow.

What version pgsql is it running? If it's 7.4 or before, you should
look at upgrading it. If you can't then a shared buffer setting in
the 1000 to 10000 range is generally reasonable, but large
shared_buffer settings (i.e. over 10000) are counterproductive for 7.4
and before.

> Now, in my postgresql.conf I have:
> shared_buffers = 100Mb

So it's a pretty modern version, since old ones can't read 100Mb as a setting.

> mas_fsm_relations = 15000
> mas_fsm_pages = 1600000
> max_connections = 300
> And I changin' to:
> shared_buffers = 1000Mb
> (The server has 2 Gb of memory)

50% is kind of big. Generally you either want it small enough that
the OS can do the majority of the caching (it's usually better at
caching large amounts of data) or large enough that the kernel cache
doesn't come into play much. 50% means that everything is buffered
exactly twice.

> mas_fsm_relations = 15000
> (The Vacuum noticed me 608 relations)
> mas_fsm_pages = 1600000
> (The Vacuum noticed me 500800 pages)
> max_connections = 300
> (I did a "ps axf | grep postgres | wc -l" and the bash brings to me the
> number of 120 and all the people is not online at now)
> My qustion is about shared_buffers, in postgresql.conf I have: min 128kB or
> max_connections*16kB # (change requires restart)
> So I did:
> 300 * (16Kb / 1024) = 4,69?
> What this result means?

That's just the minimum the server needs to operate. Not operate
well, just operate.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rafael Domiciano 2008-10-06 13:56:51 Re: Shared_buffers hint
Previous Message Marcelo Martins 2008-10-06 13:23:13 Re: Shared_buffers hint