Re: Postgres using more memory than it should

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

 



In response to Matthew Wakeling <matthew@xxxxxxxxxxx>:
> 
> Hi. I have a problem on one of our production servers. A fairly 
> complicated query is running, and the backend process is using 30 GB of 
> RAM. The machine only has 32GB, and is understandably swapping like crazy. 
> My colleague is creating swap files as quickly as it can use them up.
> 
> The work_mem setting on this machine is 1000MB, running Postgres 8.3.0.

If your query it dealing with a lot of data, it could easily use 1G per
sort operation.  If there are a lot of sorts (more than 32) you'll end
up with this problem.

1G is probably too much memory to allocate for work_mem.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@xxxxxxxxxxxxxxxxxxxxxxx
Phone: 412-422-3463x4023

****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux