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

Re: Why is PGStream.flush() taking so much time?

From: Guido Fiala <guido(dot)fiala(at)dka-gmbh(dot)de>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Why is PGStream.flush() taking so much time?
Date: 2004-11-16 07:30:07
Message-ID: 200411160830.07793.guido.fiala@dka-gmbh.de (view raw or flat)
Thread:
Lists: pgsql-jdbc
Am Montag, 15. November 2004 20:15 schrieben Sie:
> Guido Fiala wrote:
> > Due to performance problems profiling showed the PGStream.flush() - thats
> > pg_output buffered Stream - takes the most time although we do not really
> > send much sql-queries at that time, at least we get much more data than
> > we send. System and database is also almost idle at that time.
>
> Can you show us the whole profile? I can't see why flush() should be
> expensive at all. Are you sure that you are not counting time spent
> blocked in native code as busy time? (hprof likes to do that)

Used jtreeprofiler for that, and yes, after explizitely including 
java.lang.Object things look different (although flush still shows up and 
some other expensive things are there too):

method calls time   [ms]
Object.wait 109 6035.474
PGStream.ReceiveChar 789 1368.841
AbstractJdbc1ResultSet.findColumn 2923 425.492
PGStream.flush 80 416.933
PGStream.-init- 2 388.863
PGStream.ReceiveIntegerR 9418 353.866
PGStream.Receive 11452 199.189
Encoding.decodeUTF8 3953 117.751
Object.hashCode 4900 90.403
AbstractJdbc1ResultSet.toInt 1029 85.886
Encoding.encode 77 69.640
AbstractJdbc1Statement.replaceProcessing 66 60.507
AbstractJdbc1ResultSet.toBoolean 322 56.763
AbstractJdbc1ResultSet.toLong 535 50.175
Encoding.decode 6390 47.275
AbstractJdbc1ResultSet.checkResultSet 3820 43.495
AbstractJdbc1ResultSet.getFixedString 1726 38.374


In response to

Responses

pgsql-jdbc by date

Next:From: enishiseki@juno.comDate: 2004-11-16 17:29:23
Subject: JDBC calling PL/pgSQL with array parameter
Previous:From: Kris JurkaDate: 2004-11-15 21:48:28
Subject: Re: Translation updates: ru

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