db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael.Gir...@objectweb.org
Subject Re: java1.4.2 "rws" mode fix: LogToFile.java diff
Date Fri, 03 Sep 2004 16:48:32 GMT
Mike Matrigali <mikem_app@sbcglobal.net> wrote on 09/03/2004 09:21:58 AM:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> is your log preallocated or not? 

The log files are normally pre-allocated.  I do not delete the files 
before or after a test, so files get reused.  I have noticed that the test 
actually runs a little faster when it creates new files, and we have yet 
to explain that.

> Are your writes block bounded?

The block size is configurable.  The default block is 2K bytes.  Each 
block is written when it becomes full.  The channel.force() is called when 
the write queue is empty, so if the system is lightly loaded, force() is 
called for each buffer, but if system is loaded, force() gets called less 
frequently.  Depending on the hardware and OS, the average number of 
buffers that are forced ranges from 1.5 to 8 or 9. 

My measurements do not include any db IO.  The test driver only logs XA 
protocol records, with zero think time.  The objective is to determine 
that the log will not be a bottleneck for the TM.

When I tested with "rwd" I did not change any logic, so the batching of 
writes into a single force() was still going on, and the force() probably 
was not needed because the writes were already forced by the "rwd" mode. I 
guess I should modify that code to get a better number when using "rwd".

Michael Giroux

Mime
View raw message