Daniel John Debrunner wrote:
I ran a simple test of executing VALUES 1 using a prepared statement
over the network server in auto-commit mode. 10.3 seemed to be the same
performance as 10.2, maybe up to 4% slower. The 10.2 numbers for me were
consistent, but the 10.3 numbers seemed to vary from 96% to 100% of the
10.2 numbers.
I was actually surprised because I thought I seen some claims of much
faster performance with 10.3 server.
I don't remember seeing any performance improvements specific to the
network server code being checked in during the 10.3 development.
I was getting around 1,630 transactions per second (each transaction is
a VALUES 1 statement) on a 100Mbit network.
Did anyone make changes in 10.3 that they think would make this simple
test improve,
Shouldn't the VALUES 1 test benefit from DERBY-827?
> or is anyone working on reducing the basic overhead for
client server? Are the nio changes intended to improve performance?
I did some profiling of the network server (trunk, not 10.3) two weeks
ago to see if something jumped at me. I used a similar test with VALUES
1 using prepared statement, as well as a test which returned a
varchar(100) column. The motivation for the nio changes was that I
noticed that temporary byte arrays were created each time DDMWriter
wrote a string, whereas nio allowed encoding directly into the output
buffer. For a query that returned a string of 100 ASCII characters, this
change reduced the object allocations with ~600 bytes/query according to
DTrace.
I also noticed that most of the network server's CPU went into
SocketInputStream.read() (big surprise...), so I experimented with
replacing the use of Socket and InputStream in DDMReader with
SocketChannel and direct ByteBuffer (which is supposed to reduce
internal copying between buffers), but I didn't see any effect of that
change.
I don't have the profiling data here right now, but I can post them on
the wiki when I get back from vacation in two weeks, to let others see
if they can get something out of the numbers.
--
Knut Anders