update default LCS sstable size to 160MB
patch by jbellis based on tests by Daniel Meyer for CASSANDRA-5727


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e7ea389a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e7ea389a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e7ea389a

Branch: refs/heads/trunk
Commit: e7ea389a32d85c2cfe5121256aa0a4823f25c2b3
Parents: 0291d69
Author: Jonathan Ellis <jbel...@apache.org>
Authored: Mon Jul 29 14:18:28 2013 -0500
Committer: Jonathan Ellis <jbel...@apache.org>
Committed: Mon Jul 29 15:51:23 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                           |  4 ++++
 NEWS.txt                                              |  9 +++++++++
 .../db/compaction/LeveledCompactionStrategy.java      | 14 ++++++++------
 3 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7ea389a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e2502e1..9a348f1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+1.2.9
+ * update default LCS sstable size to 160MB (CASSANDRA-5727)
+
+
 1.2.8
  * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814)
  * cqlsh: add collections support to COPY (CASSANDRA-5698)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7ea389a/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 9a7dd51..ae1b21c 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -13,6 +13,15 @@ restore snapshots created with the previous major version 
using the
 'sstableloader' tool. You can upgrade the file format of your snapshots
 using the provided 'sstableupgrade' tool.
 
+1.2.9
+=====
+
+Defaults
+--------
+    - After performance testing for CASSANDRA-5727, the default LCS filesize
+      has been changed from 5MB to 160MB.
+
+
 1.2.7
 =====
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7ea389a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
----------------------------------------------------------------------
diff --git 
a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index 52c03fc..f9d8964 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -52,15 +52,17 @@ public class LeveledCompactionStrategy extends 
AbstractCompactionStrategy implem
     public LeveledCompactionStrategy(ColumnFamilyStore cfs, Map<String, 
String> options)
     {
         super(cfs, options);
-        int configuredMaxSSTableSize = 5;
+        int configuredMaxSSTableSize = 160;
         if (options != null)
         {
-            String value = options.containsKey(SSTABLE_SIZE_OPTION) ? 
options.get(SSTABLE_SIZE_OPTION) : "5";
-            configuredMaxSSTableSize = Integer.parseInt(value);
-            if (configuredMaxSSTableSize >= 1000)
+            if (options.containsKey(SSTABLE_SIZE_OPTION))
             {
-                // Yes, people have done this
-                logger.warn("Max sstable size of {}MB is configured; having a 
unit of compaction this large is probably a bad idea", 
configuredMaxSSTableSize);
+                configuredMaxSSTableSize = 
Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
+                if (configuredMaxSSTableSize >= 1000)
+                {
+                    // Yes, people have done this
+                    logger.warn("Max sstable size of {}MB is configured; 
having a unit of compaction this large is probably a bad idea", 
configuredMaxSSTableSize);
+                }
             }
         }
         maxSSTableSizeInMB = configuredMaxSSTableSize;

Reply via email to