cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/3] git commit: If detected cores is zero, try at least one. Patch by Andy Cobley, reviewed by brandonwilliams for CASSANDRA-4401
Date Wed, 11 Jul 2012 14:29:08 GMT
If detected cores is zero, try at least one.
Patch by Andy Cobley, reviewed by brandonwilliams for CASSANDRA-4401


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

Branch: refs/heads/trunk
Commit: a12aa08154faaae7e096d8a6f500d1b352ef94b8
Parents: 346ac03
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Jul 11 09:27:26 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Jul 11 09:27:26 2012 -0500

----------------------------------------------------------------------
 conf/cassandra-env.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a12aa081/conf/cassandra-env.sh
----------------------------------------------------------------------
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index a3ca022..cef0efb 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -41,6 +41,12 @@ calculate_heap_sizes()
         ;;
     esac
 
+    # some systems like the raspberry pi don't report cores, use at least 1
+    if [ "$system_cpu_cores" -lt "1" ]
+    then
+        system_cpu_cores="1"
+    fi
+
     # set max heap size based on the following
     # max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
     # calculate 1/2 ram and cap to 1024MB


Mime
View raw message