Re: core system is getting unresponsive because over 300 cpu load

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: core system is getting unresponsive because over 300 cpu load
Date: 2017-10-10 22:41:26
Message-ID: 838d0ab3-6c4f-39d3-85a1-978402e07e01@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message pinker 2017-10-10 23:00:11 Re: core system is getting unresponsive because over 300 cpu load
Previous Message pinker 2017-10-10 22:28:52 Re: core system is getting unresponsive because over 300 cpu load