pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mudfoot@rawbw.com
To: pgsql-performance@postgresql.org
Subject: Re: Performance problem using V3 protocol in jdbc driver
Date: Wed, 17 Aug 2005 01:14:24 -0700
Message-ID: <1124266464.4302f1e0d5d30@webmail.rawbw.com> (raw)
In-Reply-To: <03E7D3E231BB7B4A915A6581D4296CC6015D534E@NSNOVPS00411.nacio.xythos.com>
References: <03E7D3E231BB7B4A915A6581D4296CC6015D534E@NSNOVPS00411.nacio.xythos.com>

Quoting Barry Lind <blind@xythos.com>:

<snip>
>  
> 
> What I see when running the V3 protocol under 'top' is that the postgres
> processes are routinely using 15% or more of the CPU each, when running
> the V2 protocol they use more like 0.3%.
> 
>  
> 
> Does anyone have any suggestions on an approach to debug a problem like
> this?
> 
>  

Tracing system calls is a good starting point--truss on Solaris, strace on Linux
(Redhat anyway), ktrace on BSD.  The difference between 0.3% and 15% CPU
utilization under similar load will very likely (though not with complete
certainty) be showing very noticeably different system call activity.

If you notice a difference in system call activity, then that would probably
provide a hint as to what's going on--where the inefficiency lies.  It's
possible to spin the CPU up without any system calls, but system call tracing
can be done pretty quickly and you should be able to see any interesting
patterns emerge quite quickly.

^
|

This method is a good starting point for troubleshooting just about any funny
process activity.  And it comes with the added benefit of not having to know
ahead of time about the specific matter at hand (JDBC implementation, in this
case).  :-)  That's having your cake and eating it, too.

> 
> Thanks,
> 
> --Barry
> 
> 





view thread (6+ messages)  latest in thread

Message-ID: <1124266464.4302f1e0d5d30@webmail.rawbw.com>
Permalink:  ../1124266464.4302f1e0d5d30@webmail.rawbw.com/
Also on:    postgresql.org/message-id/1124266464.4302f1e0d5d30@webmail.rawbw.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: mudfoot@rawbw.com
  Subject: Re: Performance problem using V3 protocol in jdbc driver
  In-Reply-To: <1124266464.4302f1e0d5d30@webmail.rawbw.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