From 96c4d8e091f95e4ff0aa57598697e2d61803e75a Mon Sep 17 00:00:00 2001 From: augustin64 Date: Thu, 11 Jul 2024 16:47:12 +0200 Subject: [PATCH] Add setup.sh --- setup.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 setup.sh diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..55341b5 --- /dev/null +++ b/setup.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +MIN_FREQ=$(cpupower frequency-info -l | tail -n 1 | awk '{print $1}') +echo "Fixing frequency to ${MIN_FREQ}kHz, you should check with htop at some point during execution" +cpupower frequency-set --min $MIN_FREQ >/dev/null +cpupower frequency-set --max $MIN_FREQ >/dev/null + +echo "Disabling turbo and NUMA balancing" +echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo +echo 0 > /proc/sys/kernel/numa_balancing + +git clone https://gitea.augustin64.fr/l3-ENSL/dendrobates-t-azureus +cd dendrobates-t-azureus/cache_utils +cargo build --release --bin two_thread_cal +cp ../target/release/two_thread_cal /usr/bin/two_thread_cal + +echo "Starting measurements" +modprobe msr +/usr/bin/two_thread_cal | bzip2 -c > /root/results.txt.bz2