db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2020) Change file option for syncing log file to disk from rws to rwd
Date Fri, 03 Nov 2006 17:43:21 GMT
     [ http://issues.apache.org/jira/browse/DERBY-2020?page=all ]

Mike Matrigali updated DERBY-2020:
----------------------------------


I am also uncomfortable making this change across all jvm/OS without some better contract
from the java spec on what
exactly the options mean.  The current option was picked as it seemed "safest" way to guarantee
log write to disk.  On some OS's using the RWS flag results in only a single I/O per write
to a preallocated log file.  The key
issue is what is "metadata".  Is it timestamps for modify times in which case derby does not
care, or is it data about file
allocation which if not synced may render recovery of the log file after a system crash inconsistent
after derby thinks it has
guaranteed I/O to disk.

> Change file option for syncing log file to disk from rws to rwd
> ---------------------------------------------------------------
>
>                 Key: DERBY-2020
>                 URL: http://issues.apache.org/jira/browse/DERBY-2020
>             Project: Derby
>          Issue Type: Improvement
>          Components: Performance, Store
>    Affects Versions: 10.3.0.0
>            Reporter: Olav Sandstaa
>         Attachments: disk-cache.png, no-disk-cache.png
>
>
> For writing the transaction log to disk Derby uses a
> RandomAccessFile. If it is supported by the JVM, the log files are
> opened in "rws" mode making the file system take care of syncing
> writes to disk. "rws" mode will ensure that both the data and the file
> meta-data is updated for every write to the file. On some operating
> systems (e.g. Solaris) this leads to two write operation to the disk
> for every write issued by Derby. This is limiting the throughput of
> update intensive applications.  If we could change the file mode to
> "rwd" this could reduce the number of updates to the disk.
> I have run some simple tests where I have changed mode from "rws" to
> "rwd" for the Derby log file. When running a small numbers of
> concurrent client threads the throughput is almost doubled and the
> response time is almost halved. I will attach some graphs that show
> this when running a given number of concurrent "tpc-b" like clients. These
> graphs show the throughput when running with "rws" and "rwd" mode when the
> disk's write cache has been enabled and disabled.
> I am creating this Jira to have a place where we can collect
> information about issues both for and against changing the default
> mode for writing to log files.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message