Nicolas Thauvin <nicolas.thauvin@xxxxxxxxxx> 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 -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin