Re: Performance problem using V3 protocol in jdbc driver

From: mudfoot(at)rawbw(dot)com
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance problem using V3 protocol in jdbc driver
Date: 2005-08-17 08:14:24
Message-ID: 1124266464.4302f1e0d5d30@webmail.rawbw.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc pgsql-performance

Quoting Barry Lind <blind(at)xythos(dot)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
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Csaba Nagy 2005-08-17 09:30:51 Re: Performance problem using V3 protocol in jdbc driver
Previous Message Barry Lind 2005-08-17 05:43:40 Re: Performance problem using V3 protocol in jdbc driver

Browse pgsql-performance by date

  From Date Subject
Next Message Ulrich Wisser 2005-08-17 09:15:39 Re: Need for speed
Previous Message Barry Lind 2005-08-17 05:43:40 Re: Performance problem using V3 protocol in jdbc driver