You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2015/05/12 21:40:33 UTC

[3/6] cassandra git commit: Warn when rpc_max_threads is set very high

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/trunk
Commit: 33cf701d1d6b8112b66d02416224bb782e48b287
Parents: bed42c2
Author: Brandon Williams <br...@apache.org>
Authored: Tue May 12 14:38:02 2015 -0500
Committer: Brandon Williams <br...@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)