db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Configuring derby (hard disk access frequency)
Date Wed, 08 Aug 2007 15:27:47 GMT
Dmitri Pissarenko wrote:
> Hello!
> I have following problem: My application, which uses derby as database
> runs fine on most machines.
> However, when I try to run it on a machine with RAID1 system, it
> becomes very slow during insertion of data into the database.
> I am quite sure that the problem is with the hard disk, since CPU load
> during this process is mostly around 2 % and memory consumption
> doesn't grow either. Further, if I start this application from a USB
> hard disk on the SAME machine, it works with good performance.
> So the problem is with the hard disk.
> I would like to know whether and how I can configure Derby so that it
> accesses the hard disk less frequently.
> I suppose that the application will work the quickly, the less
> frequent Derby writes data to the hard disk.

Hello Dimitri,

This is just shot from the hip, but do you know if it is the disk 
accesses to write the log (the database/transaction log, not derby.log) 
or the data pages that slow you down?

If it is the log, you might get better performance by moving the log to 
a faster disk and then increase the page cache size.
A general advice is to keep the data and the log on separate devices.

Derby must write the log to disk when you update something to ensure 
durability. The only thing you can do about this, is to trade durability 
for performance by enabling disk/device/os caches or buffers.
Please note that this might lead to a corrupt database if you loose 
power to the machine (or have a really bad crash of some sort) while 
updating the database.


> Thanks in advance
> Dmitri Pissarenko

View raw message