pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: pgsql-performance@postgresql.org
Subject: Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)
Date: Wed, 03 Jun 2015 15:51:05 +0200
Message-ID: <556F0649.9000402@2ndquadrant.com> (raw)
In-Reply-To: <CA+RSxMiSwse+YfMoFT8128PoWG3kifmrvg4rhdBHxUTE3HPH-g@mail.gmail.com>
References: <1433334092106-5852321.post@n5.nabble.com>
	<1433337082772-5852328.post@n5.nabble.com>
	<CA+RSxMiSwse+YfMoFT8128PoWG3kifmrvg4rhdBHxUTE3HPH-g@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>



On 06/03/15 15:27, chiru r wrote:
> Hi Benjamin,
>
> It looks you are facing disk space issue for queries.
> In order to avid the disk space issue you can do the following.
> 1) Increase the work_mem parameter session level before executing the
> queries.
> 2) If you observe diskspace issue particular user queries,increase the
> work_mem parameter user level.

The suggestion to increase work_mem is a bit naive, IMHO. The query is 
writing ~95GB to disk, it usually takes more space to keep the same data 
in memory. They only have 64GB of RAM ...

In the good case, it will crash just like now. In the worse case, the 
OOM killer will intervene, possibly crashing the whole database.


> 3) Check with developer to tune the query.

That's a better possibility. Sadly, we don't know what the query is 
doing, so we can't judge how much it can be optimized.

--
Tomas Vondra                   http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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



view thread (24+ messages)  latest in thread

Message-ID: <556F0649.9000402@2ndquadrant.com>
Permalink:  ../556F0649.9000402@2ndquadrant.com/
Also on:    postgresql.org/message-id/556F0649.9000402@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com
  Subject: Re: How to reduce writing on disk ? (90 gb on pgsql_tmp)
  In-Reply-To: <556F0649.9000402@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox