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 - log write performance - OSX numbers
Date Fri, 17 Sep 2004 21:14:16 GMT
> Although the throughput varies all over the place, the
> most consistent results occur when doing a write/force
> sequence with the system write cache disabled.

Should say "with or without the system write cache disabled."

Michael Giroux




Michael.Giroux@objectweb.org 
09/17/2004 02:00 PM
Please respond to
"Derby Development" <derby-dev@db.apache.org>


To
"Derby Development" <derby-dev@db.apache.org>
cc

Subject
Re: java1.4.2 "rws" mode - log write performance - OSX numbers






I've done a bit more testing on this and discovered that results are 
significantly different if I disable the write cache on the device.  This 
makes me question whether "rwd" is actually getting the data to disk 
before it returns to the program.

I'm using Windows XP SP2.  The default setting for the IDE drive (windows 
device manager) is write cache enabled. According to the dialog box in the 

device manager:
"This setting enables write caching to improve disk performance, but a 
power outage or equipement failure might result in data loss or 
corruption."

With write cache enabled, the "rwd" tests are doing approximately 1100 
writes per second to an existing file when the test only does write(). 
When I follow the write with a channel force(), then the number of writes 
per second drops to 28 per second.

With write cache disabled, I'm seeing 100 writes per second to existing 
file when doing only the write().  Write() followed by force() does 
approximately 27 write/sec. 

Although the throughput varies all over the place, the most consistent 
results occur when doing a write/force sequence with the system write 
cache disabled.

This leads me to suspect that at least for a windows platform, it is 
necessary to actually do the channel force() if you want to be certain the 

write went all the way to the media.

Michael Giroux, objectweb.org




Jan Hlavatý <hlavac@code.cz> 
09/15/2004 12:35 PM
Please respond to
"Derby Development" <derby-dev@db.apache.org>


To
Derby Development <derby-dev@db.apache.org>
cc

Subject
Re: java1.4.2 "rws" mode - log write performance - OSX numbers






Michael.Giroux@objectweb.org wrote:
> On the survace, test #11 and #15 appear to be very similar, yet there is
> a 14x improvement in #15.
> 
> Does anyone know enough about the IO to be able to explain why
> "rw" write+force is 14x slower than "rwd" write?
> 
> Reading the Javadocs, using "rwd" the write blocks until the data is
> on disk.  With "rw" the write does not block, but the force(false) 
> does block. Since the same amount of data is involved in both cases,
> can anyone explain why the "rwd" write is so much faster?

Most probably because the implementation does not what it is supposed to 
do,
and does ordinary "rw" mode instead.

Jan





Mime
View raw message