Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Gastón Hillar

Dr. Dobb's Bloggers

Core Parking in Windows Server 2008 R2 and Windows 7

February 24, 2010

Core Parking is a new Windows kernel power manager and kernel scheduler technology designed to help improving the energy efficiency of multicore systems. It constantly tracks the relative workloads of every hardware thread relative to all the others and can decide to put some of them into sleep mode.

Core Parking allows improving the multicore energy efficiency by dynamically scaling the number of hardware threads that are in use based on workload. When the workload for one of the hardware threads is lower than a certain threshold value, the Core Parking algorithm will try to reduce the number of hardware threads that are in use by parking some of the hardware threads in the system. Hardware threads are also known as logical cores or logical processors. Figure 1 shows Windows Resource Monitor displaying the activity of eight hardware threads, with four of them parked.

Figure 1: Windows Resource Monitor indicating that four hardware threads are parked.

To make this algorithm efficient, the kernel scheduler gives preference to unparked hardware threads when it schedules non-affinitized software threads. The kernel scheduler will try to let the parked hardware threads become idle and this will allow them to transition into a lower power idle state. This means that if you create software that tries to achieve thread-affinity, it will interfere with this complex algorithm. However, when you create software that tries to maximize performance, you try to take advantage of all the available hardware threads, and therefore you usually don't want parked cores.

Under certain workloads, a system with 16 hardware threads can turn itself into a system with two hardware threads when it is under a light workload and suddenly increase and then spin up reserve hardware threads as needed.

Figure 2 shows Windows Resource Monitor displaying eight hardware threads under heavy workload, with none of them parked. The parked hardware threads transitioned into a high power state because of the additional workload.

Figure 2: Windows Resource Monitor indicating that all the available hardware threads are unparked.

Besides, Core Parking tries to schedule work between threads that are running on multiple hardware threads in the same physical core on systems with microprocessors that include Intel Hyper-Threading Technology. This scheduling decision usually improves performance on multi-threaded code running on this kind of microprocessors.

Windows Server 2008 R2 supports the complete Core Parking technology. However, Windows 7 also uses the Core Parking algorithm and infrastructure to balance processor performance between hardware threads with microprocessors that include Intel Hyper-Threading Technology.

No matter the number of parked hardware threads, if you have software that retrieves the number of hardware threads of logical cores, the number returned will be the total number and not just the unparked ones. Therefore, when you have algorithms that try to take advantage of the total number of hardware threads available, the Core Parking technology isn't going to limit the number of hardware threads assigned because some of them are parked.

Some software isn't prepared to deal with the additional latency introduced by Core Parking because it assumes that all the hardware threads are going to be in the same power state all the time. In these cases, the additional latency can introduce performance problems, especially if the software tries to offer a real-time response to the user. For example, some software that doesn't require a stable workload could fire the Core Parking algorithms many times in a few seconds and the latency introduced could generate an impact in its real-time response to the user. As you may guess, some games that aren't optimized to take full advantage of all the available hardware threads could face a problem known as micro-stuttering. Gamers call micro-stuttering the problem of not succeeding in displaying regular distributed frames due to unexpected large time intervals between individual images, i.e., a high FPS (short for Frames Per Second) followed by a low FPS.

If you want to learn about some of the enhancements in the Windows 7 kernel, you can watch this video in which Windows kernel guru Mark Russinovich talks about many of the new improvements.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.