29 lines
1.0 KiB
Bash
29 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
# Single Core Boost Test Script
|
|
# Forces maximum single-core performance to reach peak boost frequencies
|
|
|
|
echo "Testing single-core boost capability..."
|
|
echo "Current base frequency: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print $1/1000}') MHz"
|
|
|
|
# Disable cores 1-7 temporarily to force single-core boost
|
|
for cpu in {1..7}; do
|
|
echo 0 | sudo tee /sys/devices/system/cpu/cpu${cpu}/online > /dev/null 2>&1
|
|
done
|
|
|
|
echo "Cores 1-7 disabled, testing single-core boost..."
|
|
|
|
# Run intensive single-core workload
|
|
timeout 5s bash -c 'while true; do echo "scale=5000; 4*a(1)" | bc -l > /dev/null 2>&1; done' &
|
|
|
|
sleep 2
|
|
echo "Peak frequency during single-core load: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print $1/1000}') MHz"
|
|
|
|
# Re-enable all cores
|
|
for cpu in {1..7}; do
|
|
echo 1 | sudo tee /sys/devices/system/cpu/cpu${cpu}/online > /dev/null 2>&1
|
|
done
|
|
|
|
wait
|
|
echo "All cores re-enabled"
|
|
echo "Final frequency: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print $1/1000}') MHz" |