Skip site navigation (1) Skip section navigation (2)

Re: Why different execution times for different

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Kishore B <kishorebh(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why different execution times for different
Date: 2005-10-25 20:24:32
Message-ID: 1130271872.2872.2.camel@state.g2switchworks.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Tue, 2005-10-25 at 14:46, Kishore B wrote:
> Hi All, 
>  
> We are executing a single query that returned very fast on the first
> instance. But when I executed the same query for multiple times, it is
> giving strange results. It is not coming back. 
>  
> When I checked with the processes running in the system, I observed
> that multiple instances of postmaster are running and all of them are
> consuming very high amounts of memory. I could also observe that they
> are sharing the memory in a uniform distribution across them. 
>  
> Please let me know if any body has experienced the same and how do
> they resolved it.

You may or may not have an actual problem.

For one, if they're each using 128 megs, but sharing 120 megs of that
then that's not too bad.  If they're each using 512 meg and sharing 100
meg of that, then you've got a problem.

What is your sort mem set to?  Going too high can cause memory
starvation and other problems.

Also, when you run top, how much memory is being used for cache and
buffer.  If you've still got a fair amount used for cache then you're
probably ok there.

What are your settings in postgresql.conf that aren't default?  How's
the behaviour as you run 1, then 2, then 3, then 4 and so on?  Where's
the "knee" with this behaviour and what are you running out of, disk IO
or memory or memory bandwidth.

Are you using iostat/vmstat/top/free/ipcs to check resource usage under
load?

In response to

pgsql-performance by date

Next:From: Chris MairDate: 2005-10-25 21:36:02
Subject: Re: insertion of bytea
Previous:From: Kishore BDate: 2005-10-25 19:46:52
Subject: Why different execution times for different instances for the same query?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group