pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Marshall <ktm@it.is.rice.edu>
To: Jeff <threshar@torgo.978.org>
Cc: Shoaib Burq (VPAC) <sab@vpac.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: two queries and dual cpu (perplexed)
Date: Thu, 21 Apr 2005 07:36:23 -0500
Message-ID: <20050421123623.GA9371@it.is.rice.edu> (raw)
In-Reply-To: <8c459b7b96e6c310d641cebdfa8dcab6@torgo.978.org>
References: <Pine.LNX.4.44.0504212109050.28107-100000@hp.vpac.org>
	<8c459b7b96e6c310d641cebdfa8dcab6@torgo.978.org>

On Thu, Apr 21, 2005 at 08:24:15AM -0400, Jeff wrote:
> 
> On Apr 21, 2005, at 7:49 AM, Shoaib Burq (VPAC) wrote:
> 
> >Now I have not touch the $PGDATA/postgresql.conf (As I know very little
> >about memory tuning) Have run VACCUM & ANALYZE.
> >
> You should really, really bump up shared_buffers and given you have 8GB 
> of ram this query would likely benefit from more work_mem.
> 
> >and the time taken is *twice* that for the original. The modification 
> >was
> >minor. The queries do make use of both CPUs:
> >
> Is this an IO intensive query?  If running both in parellel results in 
> 2x the run time and you have sufficient cpus it would (to me) indicate 
> you don't have enough IO bandwidth to satisfy the query.
> 

I would add to Jeff's comments, that the default configuration parameters
are fairly-to-very conservative which tends to produce plans with more I/O.
Bumping your shared_buffers, work_mem, and effective_cache_size should
allow the planner to favor plans that utilize more memory but require
less I/O. Also, with small amounts of work_mem, hash joins cannot be
used and the planner will resort to nested loops.

Ken



view thread (18+ messages)  latest in thread

Message-ID: <20050421123623.GA9371@it.is.rice.edu>
Permalink:  ../20050421123623.GA9371@it.is.rice.edu/
Also on:    postgresql.org/message-id/20050421123623.GA9371@it.is.rice.edu

 · 

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: ktm@it.is.rice.edu, threshar@torgo.978.org, sab@vpac.org
  Subject: Re: two queries and dual cpu (perplexed)
  In-Reply-To: <20050421123623.GA9371@it.is.rice.edu>

* 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