cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/6] cassandra git commit: Warn when rpc_max_threads is set very high
Date Tue, 12 May 2015 19:40:31 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 bed42c210 -> 33cf701d1
  refs/heads/cassandra-2.1 19540f011 -> 98eb8ba52
  refs/heads/trunk d26bfe9a4 -> e0d25874c


Warn when rpc_max_threads is set very high

Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-9364


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

Branch: refs/heads/cassandra-2.0
Commit: 33cf701d1d6b8112b66d02416224bb782e48b287
Parents: bed42c2
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue May 12 14:38:02 2015 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue May 12 14:38:02 2015 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/33cf701d/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 b3b10c1..3c846f3 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -339,6 +339,8 @@ public class DatabaseDescriptor
             throw new ConfigurationException("The hsha rpc_server_type is not compatible
with an rpc_max_threads " +
                                              "setting of 'unlimited'.  Please see the comments
in cassandra.yaml " +
                                              "for rpc_server_type and rpc_max_threads.");
+        if (ThriftServer.HSHA.equals(conf.rpc_server_type) && conf.rpc_max_threads
> (FBUtilities.getAvailableProcessors() * 2 + 1024))
+            logger.warn("rpc_max_threads setting of {} may be too high for the hsha server
and cause unnecessary thread contention, reducing performance", conf.rpc_max_threads);
 
         /* end point snitch */
         if (conf.endpoint_snitch == null)


Mime
View raw message