You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Kristian Waagan <Kr...@Sun.COM> on 2007/08/08 17:27:47 UTC

Re: Configuring derby (hard disk access frequency)

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.


regards,
-- 
Kristian

> 
> Thanks in advance
> 
> Dmitri Pissarenko


Re: Configuring derby (hard disk access frequency)

Posted by Dmitri Pissarenko <dm...@gmail.com>.
Hello!

Thanks for your recommendations!

Now it works.

Dmitri Pissarenko
-- 
http://www.xing.com/profile/Dmitri_Pissarenko
http://dapissarenko.blogspot.com/