Re: [GENERAL] core system is getting unresponsive because over 300cpu load - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] core system is getting unresponsive because over 300cpu load
Date
Msg-id 838d0ab3-6c4f-39d3-85a1-978402e07e01@hogranch.com
Whole thread Raw
In response to Re: [GENERAL] core system is getting unresponsive because over 300 cpu load  (pinker <pinker@onet.eu>)
List pgsql-general
On 10/10/2017 3:28 PM, pinker wrote:
> It was exactly my first guess. work_mem is set to ~ 350MB and I see a lot of
> stored procedures with unnecessary WITH clauses (i.e. materialization) and
> right after it IN query with results of that (hash).

1000 connections all doing queries that need 1 work_mem each will 
consume 1000*350MB == 350GB of your ram.    many queries use several 
work_mem's.

if the vast majority of your operations are OLTP and only access a few 
rows, then large work_mem is NOT a good idea.   If you're doing large 
aggregate operations like OLAP for reporting or whatever, then thats 
another story, but generally doing that sort of thing does NOT use 1000 
connections.


-- 
john r pierce, recycling bits in santa cruz



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

pgsql-general by date:

Previous
From: pinker
Date:
Subject: Re: [GENERAL] core system is getting unresponsive because over 300 cpu load
Next
From: pinker
Date:
Subject: Re: [GENERAL] core system is getting unresponsive because over 300 cpu load