cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/3] git commit: Change concurrent_compactors defaults patch by jbellis; reviewed by bes for CASSANDRA-7139
Date Wed, 21 May 2014 18:11:31 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 e024a1cc2 -> e00878d95
  refs/heads/trunk 91741025c -> decc30888


Change concurrent_compactors defaults
patch by jbellis; reviewed by bes for CASSANDRA-7139


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

Branch: refs/heads/cassandra-2.1
Commit: e00878d9558d9220ef864c6dfb69293ada36e2bd
Parents: e024a1c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed May 21 13:11:16 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed May 21 13:11:16 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 conf/cassandra.yaml                                          | 4 ++--
 src/java/org/apache/cassandra/config/Config.java             | 2 +-
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 209ff70..61ea788 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-rc1
+ * Change concurrent_compactors defaults (CASSANDRA-7139)
  * Add PowerShell Windows launch scripts (CASSANDRA-7001)
  * Make commitlog archive+restore more robust (CASSANDRA-6974)
  * Fix marking commitlogsegments clean (CASSANDRA-6959)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/conf/cassandra.yaml
----------------------------------------------------------------------
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 6e47918..b9964ed 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -500,8 +500,8 @@ in_memory_compaction_limit_in_mb: 64
 # slowly or too fast, you should look at
 # compaction_throughput_mb_per_sec first.
 #
-# concurrent_compactors defaults to the number of cores.
-# Uncomment to make compaction mono-threaded, the pre-0.8 default.
+# concurrent_compactors defaults to the smaller of (number of disks,
+# number of cores), with a minimum of 2 and a maximum of 8.
 #concurrent_compactors: 1
 
 # Throttles compaction to the given total throughput across the entire

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index 97ceb7f..07d0a59 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -132,7 +132,7 @@ public class Config
     public Integer column_index_size_in_kb = 64;
     public Integer batch_size_warn_threshold_in_kb = 5;
     public Integer in_memory_compaction_limit_in_mb = 64;
-    public Integer concurrent_compactors = FBUtilities.getAvailableProcessors();
+    public Integer concurrent_compactors;
     public volatile Integer compaction_throughput_mb_per_sec = 16;
 
     public Integer max_streaming_retries = 3;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 7688383..c916fea 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -453,7 +453,7 @@ public class DatabaseDescriptor
         }
 
         if (conf.concurrent_compactors == null)
-            conf.concurrent_compactors = FBUtilities.getAvailableProcessors();
+            conf.concurrent_compactors = Math.min(8, Math.max(2, Math.min(FBUtilities.getAvailableProcessors(),
conf.data_file_directories.length)));
 
         if (conf.concurrent_compactors <= 0)
             throw new ConfigurationException("concurrent_compactors should be strictly greater
than 0");


Mime
View raw message