Re: How to

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Nicolas Thauvin" <nicolas(dot)thauvin(at)dalibo(dot)com>
Cc: <G(dot)De_Leeuw(at)eurofer(dot)be>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to
Date: 2011-02-07 18:14:36
Message-ID: 4D4FE22C020000250003A531@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Nicolas Thauvin <nicolas(dot)thauvin(at)dalibo(dot)com> wrote:
> On 06/02/2011 17:30, Kevin Grittner wrote:
>> Guy Deleeuw wrote:
>>
>> My hardware : lapto hp envy I7 processor with a ssd disk
>>
>>> Memory :
>>> total used free shared buffers cached
>>> 8129356 2866516 5262840 0 387172 948132
>>> -/+ buffers/cache: 1531212 6598144
>>> Swap: 15625208 0 15625208
>>
>> It looks like everything you're running, including caching the
>> entire database, or at least the active part of it, fits in less
>> than 3 GB on your 8 GB machine.
>>
>>> shared_buffers = 24MB
>>
>> Given your hardware, I would bump that to 2GB or so.
>>
>> I would also set effective_cache_size to 7GB.
>
> Here I think it is too much because when the 2 GB of shared memory
> will be used, only 6 GB of RAM will be left and maybe not entirely
> used for file system cache. My way to find effective_cache_size
> value is to put it to 50% of the amount of ram, drop the cache
> after tuning, leaving the server live for a while and have a look
> at the output of free to find the final value.

Given that the usage of effective_cache_size seems to be an estimate
of how much will be effectively cached if a single query pounds away
at an index with random reads, adding shared buffers to the space
available for OS caching seems reasonable to me, and doing so
doesn't ever seem to have caused me problems. On the other hand,
any size larger than your total database will be as effective as any
other size larger than your database. ;-)

For me, the database is usually bigger than RAM, so I just add
shared_buffers to whatever "free" shows as cached.

-Kevin

In response to

  • Re: How to at 2011-02-07 17:56:41 from Nicolas Thauvin

Browse pgsql-admin by date

  From Date Subject
Next Message Chavdar Kopoev 2011-02-07 18:54:55 PANIC: heap_update_redo: invalid lp
Previous Message Nicolas Thauvin 2011-02-07 17:56:41 Re: How to