odd jdbc driver synchronization issue - Mailing list pgsql-jdbc

From George Lessmann
Subject odd jdbc driver synchronization issue
Date
Msg-id 006401c3cfd8$58ff0760$85342fa5@elvis
Whole thread Raw
List pgsql-jdbc
Hi,

I'm trying to move my database platform from MSSQL Server to PostgreSQL.
I have a load simulation program I wrote which I'm running against a
test PostgreSQL instance. The application creates a number of client
threads, each with their own database connection, and turns them loose
on a workload. Currently, it's lagging the SQLServer test. I'm still
tuning the postgresql.conf file, but I also noticed something very odd
wrt the postmaster process. I see something like the following:

3 threads started, 0 done,
    pid 1        99%
    pid 2        0%
    pid 3        0%

2 threads started, 1 done,
    pid 1        0%
    pid 2        99%
    pid 3        0%

1 threads started, 2 done,
    pid 1        0%
    pid 2        0%
    pid 3        99%

Even though all the treads are runnable, with their own connection, and
their own postmaster process on the DB, they are still serializing their
writes. If I look in the table where the data is being generated, I see
rows inserted in order similar to what top is showing (Client3's data,
then Client6's data, then Client1's data, etc).

As this application is written in java and using the PostgreSQL jdbc
driver I'm starting here, if you feel I should post elsewhere, let me
know.

Thanks,

George

--Details--

Client machine:
 Windows XP, Java 1.4.2 (build 1.4.2-b28)
 PostgreSQL JDBC driver 7.4, 7.4.1 (no difference)

Database machine:
 Debian Linux 2.6.0-test11 #4 SMP i686 GNU/Linux
 2x 2.4GHz Xeon w/HT, 1GB RAM
 PostgreSQL 7.4




pgsql-jdbc by date:

Previous
From: "Email User"
Date:
Subject: jdbc hang at java.net.SocketInputStream.socketRead0
Next
From: Dave Cramer
Date:
Subject: Re: [HACKERS] PL/Java issues