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 ▼


TMonitor: Understanding What Happens With Each Hardware Thread

TMonitor, a new tool developed by the CPUID team, offers the possibility to understand what's going on with each hardware thread (logical core) on some modern multicore microprocessors.

Very old hardware running a single sequential code application was easier to understand than modern hardware running many applications executing dozens of software threads distributed into the available hardware threads (logical cores).

Parallelized code creates many tasks (the packages), stealing work from many threads (the cars), running on hardware threads (logical cores, the lanes). It sounds simpler using packages, cars and lanes to explain the main software and hardware layers involved in the execution of parallelized code. In fact, there is indeed much more than this. However, I'll keep the focus on the packages, the cars and the lanes.

How long is it going to take to travel 800 miles with 4 packages, using 4 cars (1 package in each car)? It depends on three variables, the number of available lanes, the cars' maximum speed and the maximum speed limit for each lane. I'll assume the cars' drivers are going to respect the maximum speed limits. It also depends on other variables. However, I'll keep the focus on these three variables.

There are many problems:

  • Some lanes aren't completely independent lanes. They share some regions with other lanes (Hyper-Threading technology).
  • The maximum speed limit for each lane could be reduced or increased (Energy saving schemes, Enhanced Intel SpeedStep Technology and Intel Turbo Boost Technology among others).
  • The cars' speed isn't constant. It changes because the cars' drivers find some traffic jams on the roads (operating system's scheduler decisions, sharing hardware resources, concurrency problems, inefficient code and I/O bottlenecks among others).

As you may guess, these problems happen in nanoseconds. Therefore, it is very important to understand modern parallel hardware in order to create efficient parallelized code.

There is a new tool, developed by the CPUID team, TMonitor, still in beta version, that allows you to display the active clock of each individual hardware thread (logical core) of a multicore microprocessor. It displays a graph showing the maximum speed limit for each lane, as shown in the following picture for a quad-code microprocessor (four physical cores without Hyper-Threading technology, four logical cores, four hardware threads):

TMonitor displaying 4 idle hardware threads (all frequencies = 2,400 MHz = 2.4 GHz).

TMonitor uses a very high refresh rate (20 times per second), therefore, it allows you to small clock variations for each hardware thread in real-time.

TMonitor displaying 1 hardware thread with its increased clock (one of the frequencies = 2800 MHz = 2.8 GHz).

TMonitor displaying 4 hardware threads with their increased clocks (all frequencies = 2,800 MHz = 2.8 GHz).

It can show you what's going on with the hardware threads. You can see the different maximum speed limits while parallelized applications are running. One of its interesting features is the possibility to detect Intel's Turbo Boost activation for each hardware threads.

The application is very simple to download and run. It comes in both 32-bits and 64-bits versions for Windows. This beta version has some limitations. It works only on Intel Core 2 and Core i3; i5 and i7 microprocessors. However, taking into account the other excellent free tools developed by the CPUID team, you can expect support for many other microprocessors soon.

The next time you want to understand what's going on with your parallelized code, you can use TMonitor to have more information about the underlying hardware. This way, you'll be able to understand why some small changes in the code could produce very different performance results.

Don't forget about maximum speed limits, packages, cars and lanes.

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.