Skip to content
Snippets Groups Projects
Commit 03622f4a authored by Peter Cai's avatar Peter Cai
Browse files

Add Caladan support

parent b34b4eec
No related branches found
No related tags found
No related merge requests found
# an example runtime config file
host_addr 192.168.199.1
host_netmask 255.255.255.0
host_gateway 192.168.199.1
runtime_kthreads {threads}
runtime_guaranteed_kthreads {threads}
runtime_priority lc
...@@ -3,6 +3,7 @@ CPUPOWER=cpupower ...@@ -3,6 +3,7 @@ CPUPOWER=cpupower
X86_ENERGY_PERF_POLICY=x86_energy_perf_policy X86_ENERGY_PERF_POLICY=x86_energy_perf_policy
PERF=perf PERF=perf
FSTACK_SRC=/home/p5cai/workspace/f-stack FSTACK_SRC=/home/p5cai/workspace/f-stack
CALADAN_SRC=/home/p5cai/workspace/caladan
# Execute all SSH commands under this user # Execute all SSH commands under this user
# so that we don't need ssh keys for root # so that we don't need ssh keys for root
......
MEMCACHED=/home/p5cai/workspace/memcached/memcached MEMCACHED=/home/p5cai/workspace/memcached/memcached
MEMCACHED_FSTACK=/home/p5cai/workspace/memcached-fstack/memcached MEMCACHED_FSTACK=/home/p5cai/workspace/memcached-fstack/memcached
MEMCACHED_CALADAN=/home/p5cai/workspace/memcached-caladan/memcached
...@@ -25,7 +25,8 @@ cleanup_memcached() { ...@@ -25,7 +25,8 @@ cleanup_memcached() {
start_memcached() { start_memcached() {
echo "Starting memcached" echo "Starting memcached"
taskset -c 0-$((THREADS - 1)) $MEMCACHED -u root -t $THREADS -b 16384 -c 32768 -m 10240 -o hashpower=24,no_lru_maintainer,no_lru_crawler $MEMCACHED_ARGS 2>&1 > /tmp/memcached.lastexp.log & echo "taskset -c 0-$((THREADS - 1)) $MEMCACHED $MEMCACHED_ARGS -u root -t $THREADS -b 16384 -c 32768 -m 10240 -o hashpower=24,no_lru_maintainer,no_lru_crawler"
taskset -c 0-$((THREADS - 1)) $MEMCACHED $MEMCACHED_ARGS -u root -t $THREADS -b 16384 -c 32768 -m 10240 -o hashpower=24,no_lru_maintainer,no_lru_crawler &
MEMCACHED_PID=$! MEMCACHED_PID=$!
} }
...@@ -65,6 +66,10 @@ memcached_pre_start() { ...@@ -65,6 +66,10 @@ memcached_pre_start() {
if [ "$FSTACK" == "true" ]; then if [ "$FSTACK" == "true" ]; then
MEMCACHED="$MEMCACHED_FSTACK" MEMCACHED="$MEMCACHED_FSTACK"
elif [ "$CALADAN" == "true" ]; then
MEMCACHED="$MEMCACHED_CALADAN"
MEMCACHED_ARGS="$MEMCACHED_ARGS $CALADAN_CONFIG -p 11211"
REINIT_RUNS=9999 # Caladan does not support restarting the application process properly
fi fi
EXPERIMENT_NAME_EXT="t$THREADS.c$CONNS" EXPERIMENT_NAME_EXT="t$THREADS.c$CONNS"
......
...@@ -6,6 +6,11 @@ QPS_STEP_PER_THREAD=5000 ...@@ -6,6 +6,11 @@ QPS_STEP_PER_THREAD=5000
pre_start() { pre_start() {
memcached_pre_start memcached_pre_start
if [ "$CALADAN" == "true" ]; then
QPS_STEP_PER_THREAD=20000
QPS_END_PER_THREAD=330000
fi
} }
run_exp() { run_exp() {
......
...@@ -41,6 +41,11 @@ while [[ $# -gt 0 ]]; do ...@@ -41,6 +41,11 @@ while [[ $# -gt 0 ]]; do
USERSTACK=true USERSTACK=true
shift shift
;; ;;
--caladan)
CALADAN=true
USERSTACK=true
shift
;;
*) *)
echo "Unknown option $1" echo "Unknown option $1"
exit 1 exit 1
...@@ -80,6 +85,23 @@ if [ "$USERSTACK" == "true" ]; then ...@@ -80,6 +85,23 @@ if [ "$USERSTACK" == "true" ]; then
mount -t hugetlbfs nodev /mnt/huge || true mount -t hugetlbfs nodev /mnt/huge || true
fi fi
if [ "$CALADAN" == "true" ]; then
pkill iokerneld || true
pkill memcached || true
if [ "$THREADS" -le 1 ]; then
echo "Must allocate one thread for IOKernel"
exit 1
fi
CALADAN_CONFIG=/tmp/caladan.config
sed "s/{threads}/$((THREADS - 1))/g" ./caladan.config > $CALADAN_CONFIG
$CALADAN_SRC/scripts/setup_machine.sh || true
sleep 5
echo "Starting up Caladan iokernel"
$CALADAN_SRC/iokerneld simple noht &
CALADAN_PID=$!
sleep 5
fi
source "./experiments/$EXPERIMENT.sh" source "./experiments/$EXPERIMENT.sh"
pre_start $@ pre_start $@
...@@ -91,6 +113,9 @@ fi ...@@ -91,6 +113,9 @@ fi
if [ "$FSTACK" == "true" ]; then if [ "$FSTACK" == "true" ]; then
EXPERIMENT_NAME="$EXPERIMENT_NAME.fstack" EXPERIMENT_NAME="$EXPERIMENT_NAME.fstack"
fi fi
if [ "$CALADAN" == "true" ]; then
EXPERIMENT_NAME="$EXPERIMENT_NAME.caladan"
fi
if [ ! -z "$EXPERIMENT_NAME_EXT" ]; then if [ ! -z "$EXPERIMENT_NAME_EXT" ]; then
EXPERIMENT_NAME="$EXPERIMENT_NAME.$EXPERIMENT_NAME_EXT" EXPERIMENT_NAME="$EXPERIMENT_NAME.$EXPERIMENT_NAME_EXT"
fi fi
...@@ -103,3 +128,7 @@ mkdir -p "$DATA_OUT" ...@@ -103,3 +128,7 @@ mkdir -p "$DATA_OUT"
run_exp run_exp
post_start post_start
if [ "$CALADAN" == "true" ]; then
kill -KILL "$CALADAN_PID"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment