db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen (JIRA) <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-801) Allow parallel access to data files.
Date Mon, 09 Jan 2006 10:45:30 GMT
Allow parallel access to data files.

         Key: DERBY-801
         URL: http://issues.apache.org/jira/browse/DERBY-801
     Project: Derby
        Type: Improvement
  Components: Performance, Store  
 Environment: Any
    Reporter: Øystein Grøvlen

Derby currently serializes accesses to a data file.  For example, the
implementation of RAFContainer.readPage is as follows:

    synchronized (this) {  // 'this' is a FileContainer, i.e. a file object
        fileData.seek(pageOffset);  // fileData is a RandomAccessFile
        fileData.readFully(pageData, 0, pageSize);

I have experiemented with a patch where I have introduced several file
descriptors (RandomAccessFile objects) per RAFContainer.  These are
used for reading.  The principle is that when all readers are busy, a
readPage request will create a new reader.  (There is a maximum number
of readers.)  With this patch, throughput was improved by 50% on
linux.  For more discussion on this, see


The challenge with the suggested approach is to make a mechanism to
limit the number of open file descpriptors.  Mike Matrigali has
suggested to use the existing CacheManager infrastructure for this
purpose.  For a discussion on that, see:


This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message