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
This commit is contained in:
Jonathan Ellis 2011-09-26 20:48:52 +00:00
parent 74c0557fdb
commit 22f52ab3a8
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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