22.04 performance

MR ZenWiz mrzenwiz at gmail.com
Wed Sep 28 21:11:02 UTC 2022


On Wed, Sep 28, 2022 at 11:44 AM Jerry Geis <jerry.geis at gmail.com> wrote:
>
:
>
> How do I get the boost 3400 ?
>
What I found many many years ago (about 10?) when I upgraded my CPU, I
did not see any significant performance boost.

I've never used 'performance', but I use a script to check my CPU
speed - it's not supremely elegant, but it doe show the difference
between idle speed and naer-max speed:

#!/usr/bin/env bash

# A bash script to show the current and maxmimum speeds of a self-throttling CPU
# by Mark A. Richter GPL 2010/12/06

# echo "$0 $*"
[[ "$1" == "-x" ]] && shift && set -x

if [[ -z "$1" ]]; then
  exec $0 $setx -errnull 2> /dev/null
  exit
fi

set_mhz() {
    mhz=$(awk '$1 == "cpu" && $2 == "MHz" { print $NF; }'
/proc/cpuinfo | tr "\n" " ")
    cpus=$(grep processor /proc/cpuinfo | wc -l)
}

set_mhz
echo "Current speed: ${mhz}MHz"
# echo -n "Type <enter> for maximum speed: "
# read ln
while [[ $cpus != 0 ]]; do
  cat /dev/zero > /dev/null 2> /dev/null &
  cpus=$(( $cpus - 1))
done
sleep 1;
set_mhz
echo "Maximum speed: ${mhz}MHz"
for i in $(ps -ef | grep zero | grep -v grep | awk '{print $2}'); do
  kill $i
done
wait

I'm using a Ryzen 9 5950 (16 cores, 32 threads) and get this from my script:

$ speed
Current speed: 3400.000 3400.000 3400.000 3400.000 3400.000 3400.000
3400.000 3400.000 3400.000 3400.000 3400.000 3400.000 3400.000
3400.000 3400.000 3400.000 3639.696 3400.000 3400.000 3400.000
3400.000 3400.000 3400.000 3400.000 3400.000 3400.000 3400.000
3400.000 3400.000 3400.000 3400.000 3400.000 MHz
Maximum speed: 4043.297 4043.295 4043.292 4043.291 4043.292 4043.290
4043.288 4043.287 4043.285 4043.286 4043.284 4043.284 4043.283
4043.281 4043.282 4043.281 4043.278 4043.279 4043.278 4043.279
4043.275 4043.276 4043.275 4043.275 4043.270 4043.273 4043.273
4043.271 4043.269 4043.269 4043.270 4043.269 MHz

If you have any kind of modern CPU, they don't run at max speed until
they have to, hence the difference.

HTH,

Mark




More information about the ubuntu-users mailing list