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/cassandra-1.1 Commit: a12aa08154faaae7e096d8a6f500d1b352ef94b8 Parents: 346ac03 Author: Brandon Williams <[email protected]> Authored: Wed Jul 11 09:27:26 2012 -0500 Committer: Brandon Williams <[email protected]> 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
