Re: Shared Buffers

From: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
To: Dennis <dennis(at)zserve(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Shared Buffers
Date: 2001-06-22 00:41:03
Message-ID: Pine.LNX.4.21.0106212025370.27771-100000@aluminum.cs.pitt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I had the same quetions more or less. I have 256Mb ram and set it according to the 1/4 rule to ~64M (shared_buffers=7500) after raising the /proc/sys/kernel/shmall and shmmax to 64M
Today I decided to go for double the money, and switched to 128M shmem and restarted postgres with shared_buffers=15000 (8192*15000=~120M). I didn't notice any difference :)
I assume that by "shared buffers" Pg means the area where common data is stored and by common data it means "index blocks" (can't think what else can be shared between processes/queries). So unless you get many users hitting different tables, you won't notice a difference.

Is there a shred of truth in this or am I...?

cheers,
thalis

On Thu, 21 Jun 2001, Dennis wrote:

>
> When starting postmaster, you can add the -B option to indicate the amount
> of shared buffers you want postgres to use. You can also specify the value
> in postgresql.conf.
>
> I read in the documentation that 1 shared buffer is 8192 bytes. Somone
> posted a while back that it was most optimal to let postgres have about 1/4
> of the memory on a dedicated machine.
>
> So, I have 512 megs on a dedicated machine. I divide that by 4 and then
> times the number of bytes in a meg and divide by 8192 and I get 16384.
> By the 1/4 standard, it seems I should set "-B 16384" at postgres startup.
>
> Postgres defaults to 64 Shared Buffers. That is a big difference from
> 16384. Is there any reason to my logic here or am I way off?
>
> Can anyone supply some more information or maybe suggest the most
> optimum way to use Shared Buffers. Is the 1/4 standard good or should
> I use even more.. or much less?
>
> Thanks in advance.
> Dennis
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ana Carolina Alonso de Armiño 2001-06-22 01:15:52 postgres 7.1.2 with SuSE 7.1
Previous Message Tom Lane 2001-06-22 00:12:52 Re: strange way to crash