0
I'm trying to understand some benchmark results I am seeing for two security libraries I use. When I run the benchmarks I notice the first several test are slower than expected. Here, slower means performance is off by about 0.5 to 0.1 cycles per byte (cpb). That is, its takes an extra 0.5 to 1.0 cycles to process one byte on average.
As an example, when I copy/paste three tests in bench.cpp
: 620 (CCM, EAX and GCM modes) to the top of the file, the tests at the bottom of the file run faster than the same tests executed at the top of the file. Only the position of the test changes.
I have a few questions about modern Intel machines like an iCore.
Does the CPU control mode transitions, or does the BIOS/UEFI handle the switch?
What/when are the expected transitions from a CPU in sleep or idle mode into nominal and max frequencies?
I'm not certain of the answer, but CPU monitoring / graphing software like CPUz may be useful to give you an ongoing report of frequencies while you test. – Christopher Hostage – 2017-10-03T20:31:05.830
1You may forbid C-states in the BIOS/UEFI and set the Performance profile. After that, your CPU should not enter powersave modes, giving you maximum performance all the time at cost of higher power consumption. – Jaroslav Kucera – 2017-10-04T07:19:32.090
Thanks @Jaroslav. I was hoping to leave the low energy state enabled and find a way to get out of it more quickly from userland. Getting out of it more quickly from userland is probably a Stack Overflow question. Once I have the background info, I will move over to Stack Overflow. It could also be its not possible from userland, and I need to run the benchmarks as root and enable max frequency immediately. – jww – 2017-10-04T21:49:37.950