Managing processor cores in Windows 7 or How to save battery

    Hello, Habr-man.
    As you know, Microsoft worked very well on its latest brainchild named Windows 7 and has made many different innovations, one of which I want to talk about. Especially relevant, I think, it will be for owners of laptops and netbooks, but users of desktop systems can also get a profit.
    As you know, the biggest innovation in the "seven" (after the GUI) is a redesigned ACPI subsystem. There is normal support for multi-core systems, and device power management, hardware monitoring, and much more, but one very interesting opportunity remains behind the scenes - we are talking about power consumption and core management of multi-core / multiprocessor systems.

    Windows 7 allows you to manage the power supply of processors, as well as assign policies of activity / idle cores.
    When working on multi-core processors, the flow between the cores is constantly rotating and the system transfers the stream from more loaded to less loaded cores, which ensures uniform loading of all cores, but also no less uniform power consumption, leads to loss of performance and increased power consumption, and this affects the first turn on battery life. Today I will try to "restore justice" by regular means of the OS.

    In Windows 7 and Windows 2008 R2, the “Processor performance core parking” function was implemented, or, in our opinion, the “Kernel parking system,” which leaves the process running on the kernel on which it started until it was completed. This approach allows you to get a more dynamic system and significantly reduce energy consumption.
    Unlike the normal mode of operation, when the processes are constantly transferred from one core to another, loading the CPU evenly, the Parking system allows you to connect the core as needed, trying to add all the tasks to the minimum number of cores (ideally one).

    Example: On a quad-core processor during idle time, only one core will be used, the rest will be parked and disabled, and during the load, the remaining kernels will be connected.

    And so, how to achieve such a feature?


    First, add the following keys to the registry. After that, go to
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583]
    "Attributes"=dword:00000000
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb]
    "Attributes"=dword:00000000
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\5d76a2ca-e8c0-402f-a133-2158492d58ad]
    "Attributes"=dword:00000000
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\a55612aa-f624-42c6-a443-7397d064c04f]
    "Attributes"=dword:00000000
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\ea062031-0e34-4ff1-9b6d-eb1059334028]
    "Attributes"=dword:00000000


    Control Panel -> Power Options -> Configuring a Power Plan -> Change Advanced Power Settings -> CPU Power Management
    and set the following parameter values:
    • Minimum number of cores in idle state (Processor performance core parking min cores) - Set 25% for four core processors (one core) - or 50% for two core processors.
    • Enable Allow Throttle States - Enable.
    • Disable processor idle (Processor idle disable) - Enable the idle state.
    • Overriding the core of the processor core suspension (Processor performance core parking core override) - Disabled.
    • Maximum number of cores in idle state (Processor performance core parking max cores) - Set to 100% (use all cores)


    After applying the new parameters, you can safely go to "resource monitoring" and admire the fact that most of the cores are disabled.



    That's all. We got the policy of using cores “for now, one core is enough for us (or how much you specify there) - we use one core”, we save battery, and the system has become more responsive.

    UPD: I will share my test - my HP Pavilion dv8-1150er used to work on a fully charged battery - 3-3.5 hours, now it lasts for 4.5 hours.

    Also popular now: