-
Notifications
You must be signed in to change notification settings - Fork 2
/
env.sh
55 lines (47 loc) · 1.38 KB
/
env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
unset BASE_PATH
unset ALLOCATOR_PATH
unset LD_LIBRARY_PATH
unset ACDC
unset ALLOCATORS
unset REPETITIONS
unset THREADS_ITERATOR
if [[ $# -ne 1 ]]; then
echo "usage: . ./env.sh <fast|paper>"
echo ""
echo "previous settings have been wiped"
return 1
fi
# allow overcommiting memory
sudo sh -c "echo 1 > /proc/sys/vm/overcommit_memory"
# disable transparent hugepages since they prohibit using madvise()
sudo sh -c "echo never > /sys/kernel/mm/transparent_hugepage/enabled"
sudo sh -c "echo never > /sys/kernel/mm/transparent_hugepage/defrag"
# general settings for all configurations
export BASE_PATH=$(pwd)
export ALLOCATOR_PATH=$BASE_PATH/allocators
export LD_LIBRARY_PATH=$ALLOCATOR_PATH/
export ACDC=$BASE_PATH/benchmarks/ACDC/out/Release/acdc
export ALLOCATORS="scalloc llalloc jemalloc hoard tcmalloc ptmalloc2 tbbmalloc_proxy supermalloc"
# streamflow does not properly work in all experiments
case $1 in
fast)
export REPETITIONS=2
export THREADS_ITERATOR="1 4 8 12"
export MAX_NATIVE_THREADS=16
;;
paper)
export REPETITIONS=10
export THREADS_ITERATOR="1 2 4 6 8 10 20 30 39 40"
export MAX_NATIVE_THREADS=40
;;
*)
echo "unknown configuration"
return 1
;;
esac
echo "configuration selected: $1"
echo " REPETITIONS: $REPETITIONS"
echo " THREADS_ITERATOR: $THREADS_ITERATOR"
echo " MAX_NATIVE_THREADS: $MAX_NATIVE_THREADS"
return 0