• SONAR
  • Windows 7 & Core Parking .... a *better* way to Turn It OFF .... (p.4)
2009/12/22 12:51:41
pinguinotuerto
Manolo


As far as one core doesn't reach 100% (and stop Sonar) before others are used, no problem of course.


Have you ever experienced this?
2009/12/22 16:32:47
Manolo
pinguinotuerto


Manolo


As far as one core doesn't reach 100% (and stop Sonar) before others are used, no problem of course.


Have you ever experienced this?
No, I've just upgraded to a new 64 bits DAW but I followed threads about Vista, Sonar and core spiking and it seems it was a problem. I just anticipate for my new DAW. Tom G has huge projects and'll have more infos for you I think.


2010/01/09 19:35:51
mfrobben
FYI - Microsoft has a full documentation page on changing power settings in more advanced ways here: http://www.microsoft.com/whdc/system/pnppwr/default.mspx
 
I have to second manolo and pinguinotuerto's comments below - is there any concrete evidence that core parking negatively affects performance for your application? Unless there's some data behind this I'd be wary of random tunings, especially deleting registry keys. Also, what are you measuring before and after the change other than %CPU? Processors have power states these days that can make %CPU utilization a misleading value - for example it could be at 100% but at a low frequency, implying that the CPU isn't even being taxed to its full extent. See
http://blogs.technet.com/winserverperformance/archive/2009/08/06/interpreting-cpu-utilization-for-performance-analysis.aspx
 
This doc, Power Policy Configuration and Deployment in Windows, explains that the best way to turn off core parking is to use powercfg from the command line: http://download.microsoft.com/download/a/d/f/adf1347d-08dc-41a4-9084-623b1194d4b2/PMPolicy_Windows.docx
 
The registry might be the underlying mechanism which controls the policies, but powercfg is a less error-prone method and faster too - the powercfg command /setactive enables power settings changes right away with no need for a reboot or log off.
 
"powercfg /qh scheme_current sub_processor" will query the power settings for your current power plan (be it high performance, balanced, or power saver).
 
As you mentioned in your post, there's two GUIDs you want. By default, these were set to the following on my machine:
 
Power Setting GUID: 0cc5b647-c1df-4637-891a-dec35c318583  (Processor performance core parking min cores)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x0000000a
    Current DC Power Setting Index: 0x0000000a
 
    Power Setting GUID: ea062031-0e34-4ff1-9b6d-eb1059334028  (Processor performance core parking max cores)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000064
    Current DC Power Setting Index: 0x00000064
 
To set min and max cores for core parking to 0 on AC power (desktop, fixed power supply), the commands would be:
"powercfg /setacvalueindex scheme_current sub_processor 0cc5b647-c1df-4637-891a-dec35c318583 0" "powercfg /setacvalueindex scheme_current sub_processor ea062031-0e34-4ff1-9b6d-eb1059334028 0"
"powercfg /setactive scheme_current"
 
If you want to set DC power, change /setacvalueindex to /setdcvalueindex.
 
This won't change the values for other power plans than the one you're currently on. Scheme_current can be replaced with scheme_balanced, scheme_max, or scheme_min to do that.
 
Cheers,
~Matt
 
2010/01/10 03:57:25
Freddie H
Thanks Matt!

Have added your POST in:

*** Did you know....Helpful thread about SONAR!***
http://forum.cakewalk.com/tm.aspx?&m=1830605&mpage=1
2010/03/06 01:53:04
mad_man
Thank you, TomG for your posts. They gave me the start point for some further research. With this solution you can simply make the "Processor performance core parking min cores" option visible in the "Advanced power management" window, so from the UI you can stop core parking for any power plan, including the new power plans you may customize.
 
This solution give you the advantage of changing core parking on the fly, without needing to edit the registry again nor the need to reboot: just switch the power plan... even while Sonar is running!, and you'll see the change in the core monitor.
 
Now, what you're doing when changing the ValueMin and ValueMax is setting the valid range of values for every possible Power Plan configuration, but you're not changing the configurations themselves. The actual value is set every time you activate a Power Plan, either by switching them or by switching from AC to DC (battery) power on laptops. For every configuration parameter, every Power Plan has two values, one for AC and another for DC. Some of those parameters, like this one, are just hidden from the Power configuration User Interface.
 
Since the parameter is hidden, it allways have the default values, 10% for both AC and DC variations in all the Power Plans. Hence, when you change the plan, this 10% value exceeds the range limit you've set for ALL the plans (from 0% to 0%), hence your solution worked. But what we actually want is to tweak the OS by changing the real values, and not it boundaries.
 
So, instead of setting the ValueMax boundary to 0, we will make this parameter visible from the UI by DELETING the "Attributes" entry under the same key (54533251-82be-4824-96c1-47b60b740d00/0cc5b647-c1df-4637-891a-dec35c318583). The only attribute bit held in the entry is the one telling the UI it is a "hidden" parameter, and by deleting the entry, the parameter will appear as a new option in the "Advanced power management" window, prompting you the ACTUAL % of cores the system is able to park under the current Power Plan, both for AC and DC powering. The range of values you may input is the one defined by the ValueMin and ValueMax, so they must remain with the same values (0 and 64 in hexadecimal/100 decimal).
 
So, step by step:
 
1) Go to RegEdit (RegEdt32.exe, even in Win7 x64):
 
2) Find the key 0cc5b647-c1df-4637-891a-dec35c318583, there are several ones with the Attribute, ValueMin, ValueMax (and othr entries) which are the ones we're interested in. Skip those having AC/DCSettingIndex (which holds the power plans configurations that we will change later from the UI).
 
3) Delete the Attribute entry.
 
3.5) ONLY IF YOU ALREADY MODIFIED THE REGISTRY AS SUGGESTED BY TomG: Set the ValueMax again to it original value: 00000064, this is REQUIRED for the current solution to work. 
 
4) Repeat the step 2 as many times as needed to delete those Attribute entries.
 
DO NOT DELETE Attribute ENTRIES FROM OTHER KEYS!
 
5) Choose a Power Management Plan, or create a new one.
 
6) Go to the Advanced settings, you will see the "processor performance core parking min cores" parameter. You'll see the default values of 10%. Change them to 0% for either AC, DC or both.
 
7) Change the Power Management Plan and see the effect on the fly.
 
From now on, if you want to change this setting you don't need to edit the registry anymore :)
 
As for my notebook, I just added a new Power Plan "Music" based on the Max Performance one, then in the Advanced Window i've set the value for AC to 0.
 
Now, when I swith the plan to "Music" with the notebook plugged to the wall, core parking gets disabled, and it is enabled again should I unplug the notebook or if I switch to any other Power Plan.
 
Enjoy your Win 7 and your Core iX! 
  
Aditional info:
 
Yesterday I was so excited after finally figuring out this solution that I made the original post at 4:30 AM, sticking to the main problem of disabling core parking. Now I am editing this post to add aditional info that may be usefull for other people.
 
The Core Parking problem root:
 
Core parking have actually two purposes, the first and most evident one is lower the power consumption and control the chip temperature, and the second one, more subtle is performance: when you have all the processor active, a lot of the background tasks are scattered among them evenly and without a "procesor afinity" (a task configuration making the OS feed the task thread to the chosen processors whenever possible). The same task thread "jumps" from one processor to the next available one, and this "jump" has an overhead because the previous processor state must be transfered to the next one, along with the cached data, with an extra penalty: current processors enhance their performance by prefetching instruction and data ahead to have them ready to execute when needed, but when they face a conditional branch in the program leading to two possible paths, the prefetching effort for one branch could be wasted (since it isn't followed), hence there exist a "jump prediction" mechanism devised to minimize this effort waste. Every time a thread jumps between processors, this prediction effort is completelly wasted. So, whith this task scheduling policy of letting tasks jump between processors the jumping overhead can account for and eficiency lose of 10%, and even 15% with a system running lots of background tasks, and even an "idle" system keeps all the processors working at less than 5%. So, the core parking feature allows the OS to implement a new scheduling policy that feeds most of those background tasks to just one of the processors, thus minimizing this eficiency lose.
 
Because of this, it is indeed better to leave core parking active whenever possible, because when taking into account the overall system performance it will be improved by up to a 10%... wich in turn frees more resources for the DAW.
 
Our problem arouses from the fact that this new scheduling policy has side effects that, as for today, are hard to predict, unless the software (the DAW) were way more tightly coupled with the OS.
 
Actually the core parking feature relies both in the softeare (OS/drivers/firmware) and the hardware (the processors themselves, should they support core parking). In the former side, it is the OS shceduling policy the one that, taking into account the current processing load, chooses NOT to feed a processor with threads, even if the chip istelf were NOT supporting the core parking feature, as to improve the overall system performance. In the later side, the chip itself is unaware of the inmediate future system load as to choose when to park or unpark a processor. Actually, when a processor doesn't get instructions to process, it is stopped, and it is awaked as soon as it faces an instruction to process. This choice is made by an extra "service processor" whose purpose is to orchestate the chip power saving/efficiency features (even more, Core iX chips can decrease or increase the clock ratio for each core in steps of 133 Mhz, according to the peace the instructions are being feed to it processors, and Core i5 and Core i7 can even boost -overclock- a core if needed).
 
Now, when the OS chooses to park or unpark a processor (disregarding if in the chip it were actually stopped or not), there's a drain of threads forced to "jump" from either the processor to be parked to some other active one, or from the active processors to the processor to be unparked. All of those "jumps", with the forementioned overheads, happens at once, creating a bottleneck that have a huge inmediate and brief inpact in the overall performance. Since the DAW is unaware in advance of the moment the OS will make one of this choices, and moreover, cannot provide the OS task scheduler of windows of oportunities in where to make those choices without inpacting it performance (it is the DAW the one that may predict the inmediate load requirements), it meets an unpredicted sudden drain of processing power leading to the glitches and dropouts.
 
This is consistent whit what we suffer from core parking: while the load is evenly distributed among the unparked processors, no matter how loaded they were, everything works fine, but while a processor is being parked or unparked, we have glitches and even dropouts. Even more, it is less likely to have a processor parked/unparked with a highly loaded system (e.g. from a big DAW project), than with a low loaded system, where the OS finds more chances to park (and later on unpark) a processor.
 
Fine tunning Core Parking to be greener without compromising your DAW -specially for those having Core i7, i.e. 8 processors:
 
Core parking is a desired feature even for us: in the ideal scenarios, the overall system performance is more efficient freeing processing power for the DAW to use it, while controlling power consumption and the temperature (a source of noise from the circuits).
 
Now this is pure theory, but I strongly believe this is feasible, and I would like to have a feedback should someone dare to try :)
 
Those having eight or more processors may choose to leave core parking active, but ensuring they have enough processors permanently active to cover their projects processing load requirements. For example, you may choose to have six processors from eight active, grossly speaking, having 4 of them for the DAW to use, and another two for the OS scheduling policy to play with the system load without reaching the point where any of the remaining two processors would have the chance of being unparked. Moreover, having enough permanently active processors, even if other processors were parked or unparked, the DAW should have anough resources to overcome the "drain of threads" bottleneck.
 
So, with the purposed solution, you may have several Power Plans from where to choose different amount of permanently active processors, as to choose among these Power Plans accodringly to the requirements from the projects you're working with.
 
The "Processor performance core parking min cores" option added to the Advanced power management window with this solution SHOULD allow you to pick the amount of cores elegible by the OS to park. This is being shown as percentage from the total amount of processors in your computer.
 
Theoretically, and according to Miscrosoft documentation for this option, should you were picking a value of 50%, you would be enabling the OS to park up to half of your processors. However, there's something odd about this interpretation because the default value (on my system, Win 7 x64 on a Core i3, two physical cores with HyperThreading, i.e. four logical processors) is 10%, and with this value the OS is parking two processors, instead of just one (if that 10% were rounded up to 25%) or none (if that 10% were rounded down to 0%). So it seems it is a matter of tryal and error as to figure out the way this value should be interpreted and used. It'd be great if someone manages to figure it out, to post it :)
 
More performance fine grain -for the most fearest dary ones:
 
DO NOT TRY THIS UNLESS YOU KNOW WHAT YOU'RE DOING, AND WITHOUT CAREFULLY READING THE DOCUMENTATION PROVIDED BY MICROSOFT!!! At least the PMPolicy_Windows.docx and the ProcPowerMgmtWin7 documents should be read.
 
Back to the registry, you will find that the key HKLM\SYSTEM\ControlSet001\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00 holds all the power management available options. Those visible in the Advanced settings window lacks the Attribute entry, while those that are hidden have an Attribute entry with a value of 1. By deleting the Attribute entry (or should some Attribute entry were having a different value, by changing this value substracting the BINARY value of 1 telling it is a "hidden" option) you will make any of those hidden parameters available from the Advanced settings to play with.
 
There's a LOT of interesting stuff there: the entire new task scheduling policy from Windows 7 and Windows Server 2008 can be exposed to be fine tunned on a per Power Plan basis. Microsoft DICROURAGES you from doing this, as they say, a mistaken value may severely afect the performance, may render your system unestable -and I suspect you may even fry your processor! So IT IS AT YOUR OWN RISK.
 
A final suggestion to Cakewalk and other software developers:
 
Microsoft documentation claims they choose to change the way the power management settings are arranged in the registry to allow third parties (hardware and software providers) to extend their capabilities and to fine tune the sistem to meet specific requirements.
 
As an alternative to the purposed solution of exposing to the user an option that Microsoft devised to be hidden, the same control over the power parking feature can be achieved with the line command PowerCFG. With this command you can change the values for the AC and DC powering for the current or for any other Power Plan, and is very likely that if there is a line command to achieve this, there should be an API to do at least the same.
 
Then an option to solve the core parking problem from within the DAW could be to save the "Processor performance core parking min cores" value from the current plan by queryng it with the PowerCFG command, and then use the command again to set this value to 0 (disabling core parking temporarily), and set the original saved value again when exiting the DAW. This option have the drawback that if the DAW crashes, the current power plan would be altered permanently. Hence other measures would have to be taken to prevent this drawback from happening -or to correct the problem seamesly for the user.
 
Another option would be to PROVIDE the users (perhaps in the download section of the website) with a Power Plan customized for the DAW. Should the user were having problems with the core parking, it would be a matter of downloading the Power Plan (a .reg file), combining it in the registry (double click on the .reg file) and choose the new Power Plan when using the DAW.
 
Regards!
 
 
 
2010/03/19 04:04:19
emergejda@yahoo.com
i would think twice about the i5 build, lotta people not seeing much better performance than a q6600, i7 860 is worth checking out, little more money but the hyper threading i think is well worth it...hope it helps toms hardware has good reviews
2010/03/19 08:57:42
jcschild
"""" would think twice about the i5 build, lotta people not seeing much better performance than a q6600,"""

if you are talking about i5 750 this is completely incorrect.
if you are talking about i5 below it (Dual core with HT) then yes.

the i7 860 is not that much morepowerful than a 750 about 10%
 
 
2010/05/08 01:24:09
Kingrazor
My system is not a DAW, but I do some video editing from time to time. Would I benefit from this?
2010/06/09 03:30:42
jsawoski

I read this "critical" alert with great interest and found it to be completely unnecessary, with the new HP laptop I just got, running Windows 7 on a quad-core i7 processor. If this registry tweak were actually necessary, I believe Cakewalk would have included it in a ReadMe or pop-up message. 

But one thing I discovered that helps with Windows 7 is ASIO4ALL. It instantly eliminates popping, stuttering, etc.

Try it: http://www.asio4all.com



 


Firstly major props to new forum member sky60234 for the following method.
 
Some of you will recall my previous regedit to turn-off Win 7 Core Parking here:-  http://forum.cakewalk.com/fb.ashx?m=1852473
 
This is now superseded by a much better method.   Thanks to  sky60234   there is now an  easier  / non-destructive  /  fully reversible  way to do this - ie: no deletions of .Reg keys needed - only an entry value adjustment.

 
________________________________________________________
 
In short, here is the better method from sky60234:-
 
- Go to Regedit
 
- Find this key:-  " 0cc5b647-c1df-4637-891a-dec35c318583 "
 
- Within this key, there is a value called:  " ValueMax "
 
- This value represents the % number of cores the system will park - the default 100%  ie:  all Cores are potentially park-able
 
- Change the value from 64 to 0 so the " ValueMin "  and  " ValueMax " are both zero
 
- You will have to find the key a few times and repeat the process for each time it is found - the number of instances will depend on the number of power profiles in your system  [  in my DAW it was only found twice ]
 
- Do a full shutdown and power-off and cold-re-start
 
________________________________________________________
 
 
I have tested the above on a clean Windows 7 x64 / Clean 8.5.1 install and it works perfectly - all Cores are available at all times and none are ever parked - the result  =  even CPU loads at all times regardless of loads.
 
As sky60234 noted, the advantage of the above is that nothing at all is being deleted from the Registry -  all that is being done is that a value is being adjusted.
 
Again, major thanks and props to   sky60234  for this excellent  fix.
 
Tom



2011/01/09 06:46:45
Supaboid
This thread, especially mad_man's post, is a very good write-up regarding the issue and the solution given here that makes use of 7's power plans is great - true set and forget.

6) Go to the Advanced settings, you will see the "processor performance core parking min cores" parameter. You'll see the default values of 10%. Change them to 0% for either AC, DC or both.


Unfortunately a typo snuck in there - readers will want to set 100% in this step. It's very easy to verify what setting does what if you want to be sure:

- Open the task manager, go to the Performance tab and click on the Resource Monitor button.
- In Resource Monitor, go to the CPU tab. On the left handside, choose 'Small' from the Views drop-down menu so that you can easily see all cores even if you're on a HT-enabled 6-core machine. Parked CPUS/threads will be clearly titled 'Parked'.

Now change the "Processor Performance Core Parking Min Cores" setting in your power plan that you created as per mad_man's instructions. If your computer is idle, you will see the change in 'Parked' CPUs one second after clicking 'Apply' in the power plan advanced settings window. 0% will cause as many Cores/Threads to be parked as the CPU will allow. 100% will keep all Cores/Threads unparked all the time.

Finally, this setting is not just relevant to SONAR - it affects pretty much any application that measures available CPU time in an event loop, i.e. practically *any* DAW and soft-synth. Depending on how well the apps in question are written, they might do things like trigger max-cpu-load thresholds too soon (the EWQL "Play" engine and Reason 4 for instance are prone to that, but you can turn it off completely in both applications anyway).

Here's a little non-SONAR data point of my own that has the advantage of clearly visible numbers. Notice how in the first picture, 'The Mouth' makes Reaktor think the CPU is loaded to ~ 18%, thanks to parked threads, and in the second picture with all threads unparked, just ~ 11%. (Click on the images to view them on imgur, click on the image again there to get the full-size version). Note that this is Reaktor running in standalone mode.





Hoping this is helpful to someone.

Cheers!


© 2024 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account