Re: Performance problem using V3 protocol in jdbc driver - Mailing list pgsql-performance

From mudfoot@rawbw.com
Subject Re: Performance problem using V3 protocol in jdbc driver
Date
Msg-id 1124266464.4302f1e0d5d30@webmail.rawbw.com
Whole thread Raw
In response to Performance problem using V3 protocol in jdbc driver  ("Barry Lind" <blind@xythos.com>)
List pgsql-performance
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
>
>



pgsql-performance by date:

Previous
From: "Barry Lind"
Date:
Subject: Re: [JDBC] Performance problem using V3 protocol in jdbc driver
Next
From: Ulrich Wisser
Date:
Subject: Re: Need for speed