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 AF06B986A for ; Sun, 15 Apr 2012 00:53:40 +0000 (UTC) Received: (qmail 74463 invoked by uid 500); 15 Apr 2012 00:53:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 74443 invoked by uid 500); 15 Apr 2012 00:53:40 -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 74434 invoked by uid 99); 15 Apr 2012 00:53:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 00:53:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 00:53:38 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3DF2936B3A8 for ; Sun, 15 Apr 2012 00:53:17 +0000 (UTC) Date: Sun, 15 Apr 2012 00:53:17 +0000 (UTC) From: "Christian Spriegel (Created) (JIRA)" To: commits@cassandra.apache.org Message-ID: <679464825.26061.1334451197255.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (CASSANDRA-4153) Optimize truncate when snapshots are disabled or keyspace not durable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Optimize truncate when snapshots are disabled or keyspace not durable --------------------------------------------------------------------- Key: CASSANDRA-4153 URL: https://issues.apache.org/jira/browse/CASSANDRA-4153 Project: Cassandra Issue Type: Improvement Reporter: Christian Spriegel Priority: Minor My goal is to make truncate to be less IO intensive so that my junit tests run faster (as already explained in CASSANDRA-3710). I think I have now a solution which does not change too much: I created a patch that optimizes three things within truncate: - Skip the whole Commitlog.forceNewSegment/discardCompletedSegments, if durable_writes are disabled for the keyspace. - With CASSANDRA-3710 implemented, truncate does not need to flush memtables to disk when snapshots are disabled. - Reduce the sleep interval The patch works nicely for me. Applying it and disabling durable_writes/autoSnapshot increased the speed of my testsuite vastly. I hope I did not overlook something. Let me know if my patch needs cleanup. I'd be glad to change it, if it means the patch will get accepted. -- 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