[ https://issues.apache.org/jira/browse/CASSANDRA-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137324#comment-13137324 ]
Rick Branson edited comment on CASSANDRA-3411 at 10/27/11 5:51 PM: ------------------------------------------------------------------- This patch pre-allocates the 128MB segment files, writes using memory-mapped I/O, and recycles the segment files once they're safe to be reused. End-to-end performance gains found across the board, increasing with the size of the row mutation. EDIT: should also mention that the number of segments initially allocated is controlled by commitlog_preallocate_segments in cassandra.yaml and defaults to 4. If more than 4 commit log segments are needed, they will be created on-demand and deleted when no longer necessary. was (Author: rbranson): This patch pre-allocates the 128MB segment files, writes using memory-mapped I/O, and recycles the segment files once they're safe to be reused. End-to-end performance gains found across the board, increasing with the size of the row mutation. > Pre-allocated, Recycled Commitlog Segment Files > ----------------------------------------------- > > Key: CASSANDRA-3411 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3411 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Rick Branson > Priority: Minor > Attachments: > 001-pre-allocated-recycled-commitlog-segment-files-CASSANDRA-3411.patch > > > An approach for improving commitlog performance is to pre-allocate the full > 128MB segment files and reuse them once all the mutations have been flushed. > Pre-allocation allows writes to be performed without modifying the file size > metadata, and should (in theory) allow the filesystem to allocate a > contiguous block of space for the file. Recycling the segment files prevents > the overhead of pre-allocation from impacting overall performance. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira