Ciao Mondo 3!

intel_logonews

We had already noticed that the WinRAR benchmark, but also the application itself, does not benefit from Hyper-Threading Technology from Intel. In fact we had the same values ​​found on the CPU 2600K, both with 8 logical cores and both with 4 logical cores.
Now we will try to shed light on the problems and secrets of the core parking of Windows Seven.

[VERSIONE ITALIANA]

 

 



Overview

We previously reported as with a simple change to the Windows registry you can disable the core parking on Windows Seven and obtain an improvement in the performance of WinRAR.
The Czechs of Deep in It have discovered how to enable an easier control of the core parking in Windows Seven.

XtremeHardware staff analyzed in depth the implications of this discovery, testing ways in which this trick works and the changes in performance, these settings imply.
Finally, we tried to understand the reasons of this "failure" of the Windows Seven core parking with targeted affinity testing.


The Core Parking

Windows Vista and Windows Seven implement a new energy-saving technique: the core parking.
This technique puts in a state of deep energy saving, if supported by the CPU, the cores not currently needed for the processing in progress.
Because sending in a state of energy saving and waking up a core is a fairly slow process, the operating system must try to guess whether a given core will be needed in the near future or not.
Like all forecasts, it may be wrong.
This is what probably happens with WinRAR in Windows Seven with the core parking enabled and an Intel CPU with Hyper Threading.
We verified that with CPU without Hyper Threading or with Hyper-Threading disabled, the "failure" does not occur.
It does not occur even with AMD Bulldozer, which could be affected by a similar problem because of the modules architecture. The hypothesis we did is that Windows Seven still did not use the core parking on bulldozers CPU. We will investigate this problem as soon as possible in a future article.



 

Controlling the Core Parking

Cpu_Parking_DEFAULT      Cpu_Parking_OFF_value_MAX_0

One way to control the core parking is to set the ValueMax sub key in the registry key


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583

This value expresses the maximum percentage (in hex, which translates 64 to 100 in decimal) of CPUs that can be "parked".
Setting this value to zero effectively disables the core parking.
We have verified that you need a reboot for the changes to take effect. This is probably due to the fact that this parameter is set at boot in the kernel and you can not change it anymore.

A second way, more practical, is a setting to enable an advanced processor core power management, to control the parking. By setting to zero the Attributes sub key in the registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583

you enable this setting in the panel. We verified that the change of this value is immediate, namely it does not require a reboot and it works in real time: it is not necessary to close and reopen the running program. This tells us that this setting works at the system level. Another important thing to note is that this setting is only effective with the core parking disabled, as described above (and after a reboot). With the core parking enabled, this setting has, strangely, no effect.
One last thing to note is an error in the caption, at least in the Italian version of Windows. It says "Minimum Stopped cores processor performance." In fact, the 0% setting completely enables the core parking and 100% setting completely disables it. Intermediate values ​​are obviously possible.


cpu_parking_estetico_0      cpu_parking_estetico_50

cpu_parking_estetico_100


These are three examples of the setting in action.

Disabling the core parking, the performance with Sandy Bridge CPUs rise significantly. Below you can see the graphs made ​​with both the stable version of WinRAR (4.01), both using the latest beta (4.10). We tested the correct application of this patch with the following processors, all of them with Hyper-Threading Technology:

  • Intel i7 860 skt 1156 4c/8t
  • Intel i7 875k skt 1156 4c/8t
  • Intel i3 2100 skt 1155 2c/4t
  • Intel i3 2120 skt 1155 2c/4t
  • Intel i7 2600k skt 1155 4c/8t 
  • Intel i7 3960X skt 2011 6c/12t

The results after disabling the core parking have been really exciting, reaching an improvement of 40%.
Bulldozer CPU and non Hyper Threaded Intel CPU have not seen any improvement.

 

winrar_4.01

 

WinRAR_beta





The Core Parking in depth

We performed a large number of tests with the sample of Core i7 2600K in our possession.

 

consumi


During all tests, both consumption and supply voltages have remained the same. The performance, however, have increased.

 

Tabella_affinit

 

The table shows the results with core parking enabled and disabled, for WinRAR, with affinity set to various combinations of cores. We verified that between core parking enabled or disabled by the register (after a reboot) and core parking enabled or disabled by user interface, did not change anything. Finally, with regard to the last line of the test, which shows the performance in single core, it was verified that each of the 8 virtual cores give the same performance.

Let's start with the analysis of the table. The first line contains the performance of WinRAR with all cores active in the two conditions of core parking on and off. These results are the same as we have seen previously.

Let's analyze the value with core parking ON and 8 threads and values with core parking OFF and 4 threads, taken with alternate virtual CPUs. We know that the processes running on core 0, 2, 4 and 6, or the cores 1, 3, 5 and 7 are run on separate physical cores. Therefore by the comparison of the results we can deduce that the Windows Seven core parking "parks" "virtual" cores first. But it does not realize that WinRAR takes 8 threads to work best and then do not wake up enough cores.

In the column on the results with core parking enabled, we see almost identical results to the first three configurations with 4 threads, which make us suspect that only two cores are not parked at that time and that they are on separate physical cores. The second last line is strange: the result is comparable to the result in single thread. This makes us think of another bug: Windows thinks it is necessary only one active core for that load and not two.

The column of the results with core parking disabled has no significant surprises: the first row with 8 thread has the highest performance, the next 2 allocate 4 threads on 2 physical and 2 logical cores, and then give sub-optimal performance, the next 2 allocate the 4 threads on separate physical cores obtaining, by the way, the same result as 8 core thread with core parking enabled, sign that Windows Seven thinks that 4 (physical) cores are enough for WinRar. The last value, the performance in single core, is unchanged.



Conclusions
The core parking of Windows uses an heuristics to determine how many cores are strictly necessary for running a software. Unfortunately, this heuristic does not always work.
At the expense of the Intel CPU with Hyper Threading. Ironically the old Windows XP is immune to this problem.
Disabling the core parking the last Intel CPU can release their full potential in light - average loads for the CPU, where the heuristic of the core parking can go wrong.
With medium - heavy loads, where the CPU is busy at most, there is no room to turn off cores: in that case you do not have improvements by turning off the core parking.
In fact, in most other benchmarks we did not noticed a relevant increase of the performance.
We do not know if Microsoft is working on a patch to work around this problem. If you want to get maximum performance at the expense of a lower energy saving, you now have a convenient way to change the settings of the core parking.

 

Marco Comerci
XtremeHardware Staff

Pubblicità