Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2201237C0C7 for ; Mon, 6 Oct 2008 10:56:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 87903-04 for ; Mon, 6 Oct 2008 10:56:54 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by postgresql.org (Postfix) with ESMTP id 1D98237BF4F for ; Mon, 6 Oct 2008 10:56:53 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 16so2063840fgg.23 for ; Mon, 06 Oct 2008 06:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=yP7Z/MQyLH0jB7vJCplLRCsN+/Gs69zrGcUvwf1yfzE=; b=hpFiEQNsBJI3gMIRWweXq32PKQxcr8D4mn4NWd5bMVXJD6ZWylQv2ykfH7qAc0w3wk p5J84hoiXeg0kqxDsYFUlTK8dtC5fxFg1ch54it/QKdxVdKs95C2NAiTI3ZYuIUBZw11 Mg2LACgoDQnrOaCuhgPWRGGcPqVdSjgMPPJGE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=D+ssV6hNHMUVvWsmk/CXgeU1ugOUUpamJ226Dy3B8dxz839YSAG7wNo2+hswetIrc3 9PpiMRKIGMdxRxAOHe908MvB11NGm0pNWENlaHEpz1OM9vd3dv891073UNiold9Q/nmf NzHHkN5Ec2FdSIg3/q1QpgjVDUXGR0k6t1L04= Received: by 10.86.26.11 with SMTP id 11mr4620544fgz.12.1223301411198; Mon, 06 Oct 2008 06:56:51 -0700 (PDT) Received: by 10.86.71.17 with HTTP; Mon, 6 Oct 2008 06:56:51 -0700 (PDT) Message-ID: <3a0028490810060656o5d1482a0r1efdb594f3aeb16c@mail.gmail.com> Date: Mon, 6 Oct 2008 11:56:51 -0200 From: "Rafael Domiciano" To: "Scott Marlowe" Subject: Re: Shared_buffers hint Cc: "pgsql-admin@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_305_15961128.1223301411178" References: <3a0028490810060452m268d0777uc18e2e605ff0bd28@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200810/24 X-Sequence-Number: 30480 ------=_Part_305_15961128.1223301411178 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm using 8.3.3 version in this machine..!So, the shared_buffers set to 100Mb is ok? Or 500Mb is better? This server we call "Reporter Server", so it's used to do heavy reports for a few users only (I could say 5 users). What could be the best config for my server with: 2 Gb RAM 300 GB HD Postgres 8.3 Dual Core 2008/10/6 Scott Marlowe > On Mon, Oct 6, 2008 at 5:52 AM, Rafael Domiciano > 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. > ------=_Part_305_15961128.1223301411178 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I'm using 8.3.3 version in this machine..!
So, the shared_buffers set to 100Mb is ok? Or 500Mb is better?
This server we call "Reporter Server", so it's used to do heavy reports for a few users only (I could say 5 users).
What could be the best config for my server with:
2 Gb RAM
300 GB HD
Postgres 8.3
Dual Core

2008/10/6 Scott Marlowe <scott.marlowe@gmail.com>
On Mon, Oct 6, 2008 at 5:52 AM, Rafael Domiciano
<rafael.domiciano@gmail.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.

------=_Part_305_15961128.1223301411178--