Last active
August 29, 2015 14:11
-
-
Save mlamina/780065d5c787880e229c to your computer and use it in GitHub Desktop.
Script for running the NUMA-aware RW lock benchmarks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download benchmark code: https://github.com/azu-labs/rw-numa-locks/ | |
2. Build the benchmark executables with "make" | |
3. Copy run.sh into the folder with the executables | |
4. (optional) Adjust the parameters in the script | |
5. ./run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NEUTRAL=0 | |
READER=1 | |
WRITER=2 | |
READER_OPT=3 | |
BENCHMARK="rw_tkt_tkt" # Name of the benchmark executable | |
THREADS=32 # Number of threads to be used | |
PREFERENCE=$NEUTRAL # Preference | |
WCSLEN=100 # time to be elapsed in the critical section when in read-write mode | |
RCSLEN=100 # time to be elapsed in the critical section when in read-only mode | |
NCSLEN=100 # time to be elapsed in the non-critical section | |
PROBABILITY=10 # probability to enter the CS in read-write mode | |
RUNTIME=10000 # Runtime in ms | |
echo -e "\nExecuting Benchmark: $BENCHMARK" | |
echo -e "Threads:\t $THREADS" | |
echo -e "Runtime:\t $RUNTIME milliseconds" | |
echo -e "Probability:\t $PROBABILITY %" | |
RESULT=$("./$BENCHMARK" $WCSLEN $RCSLEN $NCSLEN $PROBABILITY $THREADS $PREFERENCE $RUNTIME) | |
echo -e "\nThroughput: $RESULT\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment