Comments (6)
Hi Edison,
Thanks for this report.
export UARCH_BENCH_CLOCK_MHZ=4000
sudo ./uarch-bench.sh
Median CPU speed: 3.201 GHz
UARCH_BENCH_CLOCK_MHZ does not work?
This is because sudo
, by default, does not pass through environment variable from the calling context. So you export that variable but it won't be seen by the process(es) running inside the sudo
call.
You could do it like this:
sudo UARCH_BENCH_CLOCK_MHZ=4000 ./uarch-bench.sh
This explicitly sets the variable for the sudo'd process. Or you can use -E
to pass through all vars from the parent process. Finally you could use sudo --preserve-env=UARCH_BENCH_CLOCK_MHZ ./uarch-bench.sh
to pass through only the specific variable you care about.
from uarch-bench.
Median CPU speed: 3.201 GHz
@edisonchan that is because ./uarch-bench.sh
disables turbo frequencies by default for the duration of the run and the 12900KF has a non-turbo frequency of 3.2 GHz. This gives a much more stable measurement in "cycles" which is usually what I'm interested in, since you don't see many frequency transitions as you would when running at max turbo speed.
However, you can run the test with turbo enabled if you'd like: just run the binary ./uarch-bench
directly, rather than the ./uarch-bench.sh
wrapper script. This wrapper just calls into the binary after disabling turbo and setting performance
governor, but you can do this latter step by hand.
from uarch-bench.
You can confirm this by doing a ./uarch-bench.sh
run and then checking cpupower
or other frequency reporting tool while the test is running. It should show 3.2 GHz.
from uarch-bench.
@travisdowns thanks for the replies.
I choice set the UARCH_BENCH_CLOCK_MHZ because I can get very stable clock for Intel(add idle=poll in kernel cmdline and set 4 GHzin bios) and AMD(disable turbo clock in linux and set 4 GHz in bios).
and I have another question related. According Intel, when idle=poll, that is mean the CPU keep run NOPs, will that cause the test results not right?
from uarch-bench.
I choice set the UARCH_BENCH_CLOCK_MHZ because I can get very stable clock for Intel(add idle=poll in kernel cmdline and set 4 GHzin bios) and AMD(disable turbo clock in linux and set 4 GHz in bios).
Makes sense. You can run it like ./uarch-bench
then to avoid the turbo setting. I should add a mode to the wrapper to allow keeping turbo mode on.
from uarch-bench.
and I have another question related. According Intel, when idle=poll, that is mean the CPU keep run NOPs, will that cause the test results not right?
It would not directly affect "steady state" test results. It just means the CPU will be "hot polling" while it has nothing to do, e.g., before and after the test. The effects are generally: (a) the CPU always runs at a high frequency, rather than ramping down during idle and then back up under load and (b) more heat generated and the CPU runs hotter for the same reason.
Effect (a) can mean that results are more stable since you don't have the frequency ramp-up period, but on the other hand uarch-bench already has lots of warmup in there to try to ensure the CPU is already running at its target frequency before the measurements start.
Effect (b) can have the opposite effect: poll might produce slower and less stable resluts if the CPU throttles from heat because it starts the test already at a high temperature (e.g., the heat sink is already saturated) versus the case where the CPU starts cool and take take advantage of the thermal mass of the cooling system to run at higher than steady-state frequency for a while which may be long enough to complete the test.
from uarch-bench.
Related Issues (20)
- register-stalls.cpp function too giant HOT 1
- Compilation fails HOT 3
- store forwarding does not have fixed latency HOT 11
- prefetch performance test for AMD CPUs? HOT 1
- ERROR: jevents failed while reading events, error -5 HOT 2
- Cycles event sometimes gets unprogrammed with --extra-events
- [Feature Request]: A directory in the repo with numbers from different architectures HOT 4
- build fails if python2 not available
- perf timer should work on non-Intel HOT 4
- how can i test the performance of the snippet of assembly provided by myself HOT 2
- build error HOT 4
- remove MINSIGSTKSZ usage HOT 3
- 4GHz was detected as 8GHz HOT 13
- dead link on wiki HOT 3
- make: *** [Makefile:131: page-info.o] Error 127 HOT 1
- No output when choosing a series of specific tasks HOT 12
- Questions about How much bandwidth does the L2 have to give, anyway? HOT 1
- Turboboost won't be disabled for isolated cores
- Issue building the package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uarch-bench.