From 22f52ab3a8758a8c6ebfaf87fcd1310b3447a5f3 Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Mon, 26 Sep 2011 20:48:52 +0000 Subject: [PATCH] test for NUMA policy support as well as numactl presence patch by Peter Schuller; reviewed by Paul Cannon for CASSANDRA-3245 git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-1.0.0@1176048 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + bin/cassandra | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e20765e969..4b982afd70 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,7 @@ 1.0.0-final * Log a miningfull warning when a node receive a message for a repair session that don't exist anymore (CASSANDRA-3256) + * test for NUMA policy support as well as numactl presence (CASSANDRA-3245) 1.0.0-rc1 diff --git a/bin/cassandra b/bin/cassandra index 4dd249754b..638e41c043 100755 --- a/bin/cassandra +++ b/bin/cassandra @@ -91,10 +91,12 @@ fi # If numactl is available, use it. For Cassandra, the priority is to # avoid disk I/O. Even for the purpose of CPU efficiency, we don't -# really have CPU<->data affinity anyway. -if which numactl >/dev/null 2>/dev/null +# really have CPU<->data affinity anyway. Also, empirically test that numactl +# works before trying to use it (CASSANDRA-3245). +NUMACTL_ARGS="--interleave=all" +if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null then - NUMACTL="numactl --interleave=all" + NUMACTL="numactl $NUMACTL_ARGS" else NUMACTL="" fi