Subject Re: [Firebird-Java] Re: Test results: JayBird vs Interclient on blob select on Linux and Windows
Author Sergei P. Volin
> So, I think this is somehow related to kernel version and JDK. Can
> you try using IBM JDK? I will create a connection parameter to allow
> setting the socket buffer size. This will happen before release.

No, Roman - it is not related either to kernel nor to jvm at all. But I
think
I know to what parameter it is really related. Why don't you think that this
is a
page size of db. When the buffer size equals to db page size there is no
need
to wast time or resources on synchronization of data transmition. When they
are
not equal everything immedeately is slowing down. E.g my db page size is
8kb.
And the best result - about 6sec - was obtained at value of 8*1024 of
buffers sizes.
Other values - 16, 32, 64 *1024 - give the same and worse result about 18sec
, i.e.
3 times slower.

Slackware8.1 (2.4.18)
db page size = 8kb
rec./send buf. size = 8*1024/8*1024
SUN 1.3.1_07-b02 time1 = 315 time2 = 22 time3 = 563
IBM 1.4.0 time1 = 269 time2 = 20 time3 = 653
SUN 1.4.1_01-b01 time1 = 395 time2 = 25 time3 = 686

rec./send buf. size = 16*1024/16*1024
SUN 1.3.1_07-b02 time1 = 316 time2 = 21 time3 = 18284
IBM 1.4.0 time1 = 257 time2 = 21 time3 = 18276
SUN 1.4.1_01-b01 time1 = 390 time2 = 25 time3 = 18321

rec./send buf. size = 32*1024/32*1024
SUN 1.3.1_07-b02 time1 = 316 time2 = 21 time3 = 18307
IBM 1.4.0 time1 = 269 time2 = 22 time3 = 18276
SUN 1.4.1_01-b01 time1 = 389 time2 = 25 time3 = 18351

Resume, it will be very nice if you provide end user with some kind of
resource file where he/she will be able to tune up firebirdsql driver to
match db page size before using it in application. Or if you are able to
adopt buffer sizes to db page size automatically from inside the code
then this will be the best solution. It looks like IC does it somehow.
You know better what to do.

Thank you once more, Roman.
I'm waiting for your final release changes,
Sergei Volin.

PS Almost forgot:
Default buffer size parameters as I found are not related to OS at all
but to JDK (I would say even to JDK version, of course it is not a rule):

send/receive buff. sizes:
SUN and IBM JDK1.4 25260/43896
SUN JDK1.3.7 50520/87792