pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Why different execution times for different instances for the same query?
2+ messages / 2 participants
[nested] [flat]

* Why different execution times for different instances for the same query?
@ 2005-10-25 19:46 Kishore B <kishorebh@gmail.com>
  2005-10-25 20:24 ` Re: Why different execution times for different Scott Marlowe <smarlowe@g2switchworks.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Kishore B @ 2005-10-25 19:46 UTC (permalink / raw)
  To: pgsql-performance

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.
 Thank you,
Kishore.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Why different execution times for different
  2005-10-25 19:46 Why different execution times for different instances for the same query? Kishore B <kishorebh@gmail.com>
@ 2005-10-25 20:24 ` Scott Marlowe <smarlowe@g2switchworks.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Scott Marlowe @ 2005-10-25 20:24 UTC (permalink / raw)
  To: Kishore B <kishorebh@gmail.com>; +Cc: 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?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-10-25 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-25 19:46 Why different execution times for different instances for the same query? Kishore B <kishorebh@gmail.com>
2005-10-25 20:24 ` Re: Why different execution times for different Scott Marlowe <smarlowe@g2switchworks.com>

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