Search Postgresql Archives

Re: "out of memory" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 24, 2007 at 12:07:37PM +0300, Mikko Partio wrote:
> On 8/23/07, Martijn van Oosterhout <kleptog@xxxxxxxxx> wrote:
> > You've got it completely wrong. By setting shared_buffers to 2GB it
> > means no-one can use it. It's not postgres that's running out of
> > memory, it's the rest of your system. Set it to something sane like
> > 128MB or maybe smaller.
> Isn't 128MB quite low considering the "current standard" of 25% - 50% of
> total ram?

Not sure about "current standard" but it depends heavily on your
system. On my laptop where postgres is among the least important
applications, even 16MB might be too much. If you have a server
dedicated to it, maybe a larger percentage would be helpful, but >50%
of memory is definitly counterproductive.

The basic issue is that everything postgres reads into shared_buffers
is going to be in the system-wide disk cache also. That's two copies of
everything -> wasted memory. I think it's probably more to do with your
write-traffic than read-traffic.

At the very least, if you're reaching the point where the kernel is
swapping shared memory to disk, you've lost. More is most definitly not
always better.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux