You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/03/12 23:41:18 UTC
[11/38] incubator-usergrid git commit: Updated tomcat threads to be
configurable per core in cloud formation template
Updated tomcat threads to be configurable per core in cloud formation template
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/10ec6354
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/10ec6354
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/10ec6354
Branch: refs/heads/USERGRID-396
Commit: 10ec6354c9d6128b28811ba969d2ba3eec24b624
Parents: 710a1a3
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Mar 6 13:35:17 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Fri Mar 6 13:35:17 2015 -0700
----------------------------------------------------------------------
.../src/main/dist/init_instance/init_rest_server.sh | 3 ---
stack/awscluster/src/main/groovy/configure_usergrid.groovy | 6 +++---
stack/awscluster/ugcluster-cf.json | 8 ++++++++
3 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/10ec6354/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh b/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
index 3860cd4..cad4e74 100644
--- a/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
+++ b/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
@@ -68,9 +68,6 @@ export ACCEPT_COUNT=100
export NR_OPEN=1048576
export FILE_MAX=761773
-#Number of threads to allow per core
-export NUM_THREAD_PROC=25
-
#Get the number of processors
export NUM_PROC=$(nproc)
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/10ec6354/stack/awscluster/src/main/groovy/configure_usergrid.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/configure_usergrid.groovy b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
index 619c0b4..1f7140c 100644
--- a/stack/awscluster/src/main/groovy/configure_usergrid.groovy
+++ b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
@@ -50,9 +50,9 @@ def esShards = numEsNodes;
//This gives us 3 copies, which means we'll have a quorum with primary + 1 replica
def esReplicas = 1;
-def cassThreads = System.getenv().get("TOMCAT_THREADS")
+def tomcatThreads = System.getenv().get("TOMCAT_THREADS")
//temporarily set to equal since we now have a sane tomcat thread calculation
-def hystrixThreads = cassThreads
+def hystrixThreads = tomcatThreads
//if we end in -1, we remove it
def ec2Region = System.getenv().get("EC2_REGION")
@@ -99,7 +99,7 @@ cassandra.keyspace.strategy=org.apache.cassandra.locator.NetworkTopologyStrategy
cassandra.keyspace.replication=${cassEc2Region}:${replFactor}
cassandra.timeout=5000
-cassandra.connections=${cassThreads}
+cassandra.connections=${tomcatThreads}
hystrix.threadpool.graph_user.coreSize=${hystrixThreads}
hystrix.threadpool.graph_async.coreSize=${hystrixThreads}
usergrid.read.cl=${readConsistencyLevel}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/10ec6354/stack/awscluster/ugcluster-cf.json
----------------------------------------------------------------------
diff --git a/stack/awscluster/ugcluster-cf.json b/stack/awscluster/ugcluster-cf.json
index 9bce545..7926929 100644
--- a/stack/awscluster/ugcluster-cf.json
+++ b/stack/awscluster/ugcluster-cf.json
@@ -46,6 +46,12 @@
],
"ConstraintDescription": "must be valid instance type."
},
+ "TomcatThreadsPerCore": {
+ "Description": "Number of threads to configure tomcat for per core",
+ "Type": "Number",
+ "Default": "50",
+ "MinValue": "1"
+ },
"KeyPair": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "AWS::EC2::KeyPair::KeyName",
@@ -1171,6 +1177,8 @@
"\n",
"export RELEASE_BUCKET=", { "Ref":"ReleaseBucket" }, "\n",
"\n",
+ "export NUM_THREAD_PROC=", { "Ref":"TomcatThreadsPerCore" }, "\n",
+ "\n",
"export SUPER_USER_EMAIL=", { "Ref":"SuperUserEmail" }, "\n",
"export TEST_ADMIN_USER_EMAIL=", { "Ref":"TestAdminUserEmail" }, "\n",
"\n",