Windows 2000 Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 13 June 2011

CPU Parking revisited: How to enable or disable CPU Parking yourself without registry edits

Posted on 14:18 by Unknown
This post has been superceded by this newer, better, and more up to date one.. including a new freeware utility called ParkControl that can assist in enabling or disabling CPU core parking. For information, see http://bitsum.com/about_cpu_core_parking.php

OLD ARTICLE (still better than all those that tell you to edit the registry)

A month ago I wrote a long blog post about CPU Parking, a new feature of Windows 7 / 2008 R2. Since I later deferred release of a quick feature to toggle this system setting, I deleted the rambling blog post. I decided it was past time to restore some information on CPU Parking.

CPU Parking is a feature of multi-core/SMP systems that disables cores when the system load is low enough to allow such. Windows provided no direct way to adjust this via the user interface, as they likely thought everyone would want to keep this enabled. According to public documentation on the feature, unpark time is near instantaneous. Indeed, it may very well be. Additionally, by parking CPUs you can potentially reduce core thrashing - when a thread is swapped between cores unnecessarily, causing a performance hit.

However, for systems where power consumption and heat are not an issue, but maximum performance is, it may be desirable to disable CPU Parking. The fact is that even if unparking is near instantaneous, CPU utilization usually occurs in very brief bursts, something I mention frequently. If you look at your CPU utilization and see 15%, that is actually the percentage of time the CPU was active within a relatively large interval (usually 1 second). Actual CPU utilization most often occurs in micro-bursts where the CPU is fully consumed for a few nanoseconds or microseconds. You want those bursts to execute as fast as possible, and this is why all power saving technologies, including frequency scaling, incur *some* performance hit. This is also why a faster CPU does matter, even if you typically don't utilize 100% of available CPU time over a larger interval.

Whether or not Core Parking is actually used on your PC depends on a few factors. First, your PC must be have at least 2 physical or logical cores/CPUs. Most of the time it is enabled for laptops and servers, but not for desktops. It can also vary between vendors, as many create sets of custom power schemes supposed to offer better performance or improved battery life (rarely do they). It also can vary between Windows editions. The Server Editions tend to make more aggressive use of it by default.

Want to see if it is active or not? Fire up the Windows Resource Monitor and go to the CPU tab. Parked cores will be clearly shown as 'Parked' in the caption of their graph. CPU Parking is actually done quite aggressively. On a dual-core HyperThreaded Core i5 (4 logical cores), I have seen cores parked even as total CPU utilization approaches 50%. Windows seems fairly smart, parking the HyperThreaded/fake cores first.

Changing CPU Parking Settings

Many places on the internet tell you to edit the registry directly when adjusting CPU Parking. I don't actually recommend this. Instead, use the console mode powercfg.exe. Using it you can also tune the CPU Parking so that a certain percentage of your cores must remain unparked at any given time.

You must run this utility with elevated rights, so be sure to open an elevated console window by right-clicking 'cmd.exe' and selecting 'Run as Administrator'.

To mandate 50% of available cores always remain unparked, run:
powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 50
To adjust it so that only 25% of available cores remain active at all times, allowing 75% of available cores to be parked, you'd run:
powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 25
Yes, you can use '0' - Windows is not stupid enough to park all cores at once, it will always leave at least one core active. In fact, this is usually the default setting when it is enabled. For example, to enable maximum use of CPU Parking:
powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 0
To disable CPU Parking completely, you'd want to run:
powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 100  
After changing the power scheme settings for CPU Parking as desired, you then want to make the changes active by running the command:
powercfg -setactive scheme_current
When I first wrote this I included allowing specification of AC or DC (battery) values for the power scheme. Setting the DC power value isn't documented, so I am going to skip that. Still, to do so you'd simply replace '-setacvalueindex' with '-setdcvalueindex'. It also is not entirely clear if this is supported for every power scheme, though it certainly appears to be. Sadly, Microsoft's documentation is quite scarce.

You should not have to reboot for these changes to take effect. Go ahead and check the Resource Monitor and verify that CPU Parking is indeed as you set it.

I hope this helps some people. Why would you go around making manual edits to the registry when powercfg can do the job for you? You shouldn't. Registry edits are prone to mistakes and are generally more tedious and less clear.

Enjoy ;)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • WARNING: Cracks for Process Lasso may modify HOSTS file
    WARNING:  Cracks for Process Lasso have been seen to modify your system HOSTS file so that you can no longer access  bitsum.com  and/or  bit...
  • Process Lasso v3.65.3 beta released
    I've released the first new beta that is 100% UNICODE. I've regression tested almost all the software, though there may still be som...
  • Process Lasso v5.0.0.28
    This build continues maintenance, fixing several items and also making a nice improvement to the graph's display. Further, the last sele...
  • v5.0.0.18: Fix auto updater in XP
    During testing a few hours ago I noticed the auto-update was failing in some XP installations. Specifically, it would appear to stall at the...
  • BETA: Vista startup configuration
    Ok, I've got this fully correct now I think. In some cases in previous builds you could end up with both registry and Task Scheduler sta...
  • Process Lasso v5.0.0.48
    Changes: [.48]Change.GUI: Do not show 'Activate Now' menu item after activation [.48]Change.GUI: Adjusted logging thread CPU and I/O...
  • v5.0.0.17 final - Minor fixes
    This build fixes a reported issue with the watchdog rules (re: not default affinities, priorities, power schemes, but rather the terminate/r...
  • v5.0.0.21: Fix failure of web links within Process Lasso on some systems
    I've had reports of sporadic failure of the web links within Process Lasso. I've analyzed this situation for a while today and found...
  • One bit of bad news, one bit of good news
    One disappointing thing is that I've decided to cancel the change history shown in the update dialog, at least for v4.1. I may add it in...
  • Oh the frustration with this corporate crapware!!
    I now get uninstall feedback, as I solicit it (for better or worse). Once read, I can never go back, lol. Fortunately, most of it is actuall...

Blog Archive

  • ►  2013 (1)
    • ►  March (1)
  • ►  2012 (6)
    • ►  September (1)
    • ►  July (1)
    • ►  June (2)
    • ►  January (2)
  • ▼  2011 (166)
    • ►  December (3)
    • ►  November (2)
    • ►  October (2)
    • ►  September (6)
    • ►  August (12)
    • ►  July (14)
    • ▼  June (17)
      • v5.0.0.30 released
      • Process Lasso v5.0.0.29
      • Forum RSS feeds now primary release notification
      • v5.0.0.28 graph change
      • CPU Parking revisited: How to enable or disable CP...
      • Process Lasso v5.0.0.28
      • Windows XP w/o Terminal Services config file reset...
      • v5.0.0.27: A few fixes and restores Windows 2000 s...
      • Fix for Windows 2000 users coming next build
      • Betanews publishes Process Lasso v5 release article
      • v5.0.0.26: A few very minor adjustments
      • v5.0.0.25: Portable Edition goes final, command li...
      • Portable Edition: Changing distribution format
      • Product description and marketing maintenance
      • v5.0.0.24: Re-enable full self memory optimizations
      • v5.0.0.23: Fix some minor issues, larger update be...
      • New minor update coming soon
    • ►  May (19)
    • ►  April (13)
    • ►  March (27)
    • ►  February (31)
    • ►  January (20)
  • ►  2010 (203)
    • ►  December (23)
    • ►  November (34)
    • ►  October (38)
    • ►  September (17)
    • ►  August (19)
    • ►  July (19)
    • ►  June (11)
    • ►  May (16)
    • ►  April (8)
    • ►  March (6)
    • ►  February (6)
    • ►  January (6)
  • ►  2009 (43)
    • ►  December (6)
    • ►  November (1)
    • ►  October (10)
    • ►  September (3)
    • ►  August (1)
    • ►  July (9)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (4)
Powered by Blogger.

About Me

Unknown
View my complete profile