[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some observations



On Sat, 16 Dec 2000, Falko Braeutigam wrote:
    : 
> > [Slowness]
> > > This one again...
> > > 
> > > Peter, it is very slow to call a database object from the client. The socket
> > > latency is the bottleneck. Creating/deleting your objects inside a database
> > > omethod (thus inside the server) is around 1000 times faster. Please read docu
> > > on this.
> > 
> > Yes, I do realize that it is going to be slow to do a remote access. But I
> > don't understand why Ozone doesn't seem to utilize the CPU fully. In my
> > experience, client/server apps running locally tend to eat the CPU 100%
> > (i.e. with no internal socket latency problem).

I finally got the time to look into this. I did some testing and found that CPU
utilization is bad and that the CPU spends a _lot_ of time inside the kernel
when the ozone client does nothing than calling a method inside the server. Ok,
looks like buffer problem. I checked the code - nothing. Hmm... checked again,
added some log messages and... they did not appear! I was fiddling inside
DxServer code but when using DxMultiServer a DxClient is at _both_ ends of the
connection... :| Ok, I added proper buffer code the DxClient and got much
better peformance _and_ scalability! Thanks Peter for the hint!

Here are the results of my testing [2*350MHz, 256MB, Linux, Sun1.3]:

- 1000 calls from the client inside one transaction: 1.8ms per call !
  (this is at least 10 times faster than before)
 
- 1000 calls from the client, 1 transaction per call: 2.5ms per call !

Just for the record, a method call inside the server takes around 0.008ms.

But now, perhaps even more important, scalability test:

- 100 clients (threads), a 100 calls inside one transaction: 1.8ms per call !!!

While running the 100 threads test I got around 800% CPU utilization, which
means that in this test case ozone would easily scale up to a 8-way SMP system.
Can anybody with more CPUs available check this? ;)

The patch and the test code is in the CVS. The test code is in
org.ozoneDB.test.simple.

> 
> Maybe there is a problem in the socket communication code of ozone. But
> honestly, I don't expect such a problem to exist.

Here I was was completely wrong. ;)

Ok guys, if there is still anybody around, I would like to which you a merry
Christmas.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com