Subject Re: Firebird 1.5 with Jaybird 1.5 and cpu-utilization
Author Roman Rokytskyy
Hi,

> we have switched our aplication from Firebird 1.0 and Interclient to
> Firebird 1.5 with Jaybird1.5RC3 (type 4 mode).
> I 've done some tests on my Windows XP workstation and perfomance
> was the same or better than before.

Nice to hear that.

> At some custumer sites we now have problems with cpu-utilization.
> It's to low !
> They are all Windows 2000 Server machines
> When we start our application (many selects on many tables) on one
> system we have an average utilization of 25-30 %
> (Dual Pentium III-S system) instead of 100 %, so it takes 3 times
> longer than normal.

What happens to the disk system?

> On some other system (XEON System, maybe with Hyperthreading) i see
> 100% utilization at the beginning and when it comes to our biggest
> table it goes down to 0-10 % and so it takes very long to complete
> the reads on this table.

Ensure that you have Hyperthreading switched off or you have assigned
CPU affinity to only one processor. Failing to do so will make
Firebird process to be ping-ponged between virtual processors.

> With our old version there was no such problems.

This can also have something to do with the network, but I doubt.

> I have tested Firebird 1.0 and Firebird 1.5.1RC3 on the Pentium
> III-S machine without any difference.

You mean that also there CPU is at 20-30% of load?

> Same databases on my system works normal with 100% cpu-utilization.
>
> Does anyone have an explanation for this behaviour ?

You can use some Java profiler (JProbe for example or OptimizeIt), and
measure the JayBird performance. JayBird works ok, if ~50% of the time
is spent in XdrInputStream.read(...) method (it waits/receives for
data from the server). If time spent in this method is significantly
bigger 50% (let's say ~80%), then database server is slower, if it is
significantly less than 50% (I'd say ~25-30%), then something is wrong
with JayBird. Rest of JayBird methods should not use too much CPU,
only couple percents per method.

Also, try to check with the profiler the performance of the complete
application - maybe there's some threading issues...

Hope this helps.

Roman