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

Initial skeleton for experimental scripts

parents
No related branches found
No related tags found
No related merge requests found
IS_CUSTOM_KERNEL=true
KERNEL_SRC=/home/p5cai/workspace/linux
CPUPOWER=$KERNEL_SRC/tools/power/cpupower/cpupower
X86_ENERGY_PERF_POLICY=$KERNEL_SRC/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$KERNEL_SRC/tools/power/cpupower"
IS_CUSTOM_KERNEL=false
CPUPOWER=cpupower
X86_ENERGY_PERF_POLICY=x86_energy_perf_policy
run.sh 0 → 100755
#!/usr/bin/env bash
set -e
if [ "$UID" -ne 0 ]; then
echo "Script must be run as root"
exit 1
fi
source ./configs/base.sh
if [ -e "./configs/$(uname -r).sh" ]; then
echo "Loading kernel-specific config for $(uname -r)"
source ./configs/$(uname -r).sh
fi
source ./tunings/base.sh
# Networking parameters
sysctl -w net.core.somaxconn=1048576
sysctl -w net.ipv4.tcp_max_syn_backlog=262144
sysctl -w net.ipv4.tcp_tw_reuse=1
sysctl -w net.ipv4.ip_local_port_range="1024 65535"
sysctl -w vm.max_map_count=2097152
# Debugging options
echo 0 > /proc/sys/kernel/yama/ptrace_scope # gdb attach
echo -1 > /proc/sys/kernel/perf_event_paranoid # perf anything
echo 0 > /proc/sys/kernel/kptr_restrict # perf tracing
echo 0 > /proc/sys/kernel/nmi_watchdog # perf cache tracing
# CPU frequency
$X86_ENERGY_PERF_POLICY --turbo-enable 0
$CPUPOWER frequency-set -f 2.7GHz
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