cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Detect memory for heap sizing on OSX. Patch by Cathy Daw, reviewed by brandonwilliams for CASSANDRA-5157
Date Tue, 15 Jan 2013 12:33:30 GMT
Updated Branches:
  refs/heads/cassandra-1.1 7eb47c50c -> 4faed779d


Detect memory for heap sizing on OSX.
Patch by Cathy Daw, reviewed by brandonwilliams for CASSANDRA-5157


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

Branch: refs/heads/cassandra-1.1
Commit: 4faed779d1cacedf524cb47711071a5a6ada8809
Parents: 7eb47c5
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Jan 15 06:32:08 2013 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Jan 15 06:33:01 2013 -0600

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4faed779/conf/cassandra-env.sh
----------------------------------------------------------------------
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index 95760dd..e38371f 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -30,6 +30,11 @@ calculate_heap_sizes()
             system_memory_in_mb=`prtconf | awk '/Memory size:/ {print $3}'`
             system_cpu_cores=`psrinfo | wc -l`
         ;;
+        Darwin)
+            system_memory_in_bytes=`sysctl hw.memsize | awk '{print $2}'`
+            system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
+            system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
+        ;;
         *)
             # assume reasonable defaults for e.g. a modern desktop or
             # cheap server


Mime
View raw message