BUG #4909: wish: easier way to configure RAM allocation - Mailing list pgsql-bugs

From Richard Neill
Subject BUG #4909: wish: easier way to configure RAM allocation
Date
Msg-id 200907082343.n68NhAOd071651@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4909
Logged by:          Richard Neill
Email address:      rn214@cam.ac.uk
PostgreSQL version: 8.4
Operating system:   Linux
Description:        wish: easier way to configure RAM allocation
Details:

I've been using Postgres for ages (thanks very much, btw), and I still find
the various memory-configuration options confusing. It's rather a black art
to decide what should be allocated where, and postgres probably knows better
than I do.

So my wish is a single configuration setting that says

"I've bought a shiny new server with 8GB of RAM in it. Postgres can have up
to 6GB for its own use, and I'll let Postgres make its own choice on how
best to use it."

In particular, things like the working memory are complex to configure. If I
have one really complex query, in a single connection, I want postgres to
use all the RAM it has, and never swap to disk. But I can't set the work-mem
size too high, otherwise (I think), that, at some other point, multiple
apache instances with simple queries will fight over which gets unique
access to the entire memory allocation.

It's even more confusing because I want, wherever possible, for most of the
tables, and all the indices to stay in RAM. But should one leave this to
Linux and the file-cache, or should Postgres do it?

Furthermore, though I appreciate how amazing it is that Postgres can run in
16MB of RAM, on a server with 500 x that much memory, the default
configuration isn't very helpful in terms giving hints how to scale up.

Thanks,

Richard

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4908: escaping and dollar quotes: "ERROR: unterminated string"
Next
From: wstrzalka
Date:
Subject: Re: Unknown winsock error 10061