From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Nicolas Thauvin <nicolas.thauvin@dalibo.com>
Cc: G.De_Leeuw@eurofer.be
Cc: pgsql-admin@postgresql.org
Subject: Re: How to
Date: Mon, 07 Feb 2011 12:14:36 -0600
Message-ID: <4D4FE22C020000250003A531@gw.wicourts.gov> (raw)
In-Reply-To: <4D503259.2000905@dalibo.com>
References: <4D4E7861020000250003A4C9@gw.wicourts.gov>
<4D503259.2000905@dalibo.com>
Nicolas Thauvin <nicolas.thauvin@dalibo.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, nicolas.thauvin@dalibo.com, G.De_Leeuw@eurofer.be
Subject: Re: How to
In-Reply-To: <4D4FE22C020000250003A531@gw.wicourts.gov>
References: <4D4E7861020000250003A4C9@gw.wicourts.gov> <4D503259.2000905@dalibo.com> <4D4FE22C020000250003A531@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox