Search Postgresql Archives

Re: Controlling memory of session

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

 



On Thu, Jan 18, 2007 at 11:52:12AM +0100, Magnus Hagander wrote:
> > Not knowing how much RAM can take the server is annoying. You have to be
> > extra careful and scale the server down as you don't know what will happen.
> 
> The fact that work_mem is "per sort" and not "per backend" is going to
> cause you more problems than the overhead in trying to figure out how
> far you can do. The fact that there is no "work_mem per backend" is
> certainly very annoying, but it's obviously hard to fix or it would've
> been fixed already :-)

If you knew beforehand how much memory you were going to need, you
wouldn't need to run any queries because you'd know the answers already
:)

What exactly would you expect to happen? At some point you run a query
and it says "out of memory", even though your machine has masses of
memory left over? A bit like VM overcommit?

If you know your queries don't generally use more than one sort, it's
fairly easy to estimate memory usage. The best way to find out how many
backends you can handle is: simulation. Anything else is guesswork.

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