Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3D00179A0 for ; Wed, 4 Feb 2015 15:58:46 +0000 (UTC) Received: (qmail 35671 invoked by uid 500); 4 Feb 2015 15:58:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 35628 invoked by uid 500); 4 Feb 2015 15:58:35 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 35615 invoked by uid 99); 4 Feb 2015 15:58:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 15:58:35 +0000 Date: Wed, 4 Feb 2015 15:58:35 +0000 (UTC) From: "Joshua McKenzie (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8729) Commitlog causes read before write when overwriting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14305348#comment-14305348 ] Joshua McKenzie commented on CASSANDRA-8729: -------------------------------------------- While testing for CASSANDRA-6890 (debating removing mmap path), it was pretty clear from my testing that mmap'ed I/O on Windows has a considerable advantage over buffered to a degree that linux does not. I'm of the opinion we should make efforts to memory-map our I/O on Windows wherever possible, with the known caveat that it makes deleting and renaming files more complicated (all segments have to be unmapped before either of those ops). > Commitlog causes read before write when overwriting > --------------------------------------------------- > > Key: CASSANDRA-8729 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8729 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Ariel Weisberg > > The memory mapped commit log implementation writes directly to the page cache. If a page is not in the cache the kernel will read it in even though we are going to overwrite. > The way to avoid this is to write to private memory, and then pad the write with 0s at the end so it is page (4k) aligned before writing to a file. > The commit log would benefit from being refactored into something that looks more like a pipeline with incoming requests receiving private memory to write in, completed buffers being submitted to a parallelized compression/checksum step, followed by submission to another thread for writing to a file that preserves the order. -- This message was sent by Atlassian JIRA (v6.3.4#6332)