| October 23, 2011 12:00 AM PDT | |
The Intel Guide for Developing Multithreaded Applications (PDF 2.86MB)
Table Of Contents:
Application Threading
This chapter covers general topics in parallel performance but occasionally refers to API-specific issues.
1-1 - Predicting and Measuring Parallel Performance
1-2 - Loop Modifications to Enhance Data-Parallel Performance
1-3 - Granularity and Parallel Performance
1-4 - Load Balance and Parallel Performance
1-5 - Expose Parallelism by Avoiding or Removing Artificial Dependencies
1-6 - Using Tasks Instead of Threads
1-7 - Exploiting Data Parallelism in Ordered Data Streams
1-8 - Using AVX Without Writing AVX Code - New
Synchronization
The topics in this chapter discuss techniques to mitigate the negative impact of synchronization on performance.
2-1 - Managing Lock Contention- Large and Small Critical Sections
2-2 - Use Synchronization Routines Provided by the Threading API Rather than Hand-Coded Synchronization
2-3 - Choosing Appropriate Synchronization Primitives to Minimize Overhead
2-4 - Use Non-blocking Locks When Possible
Memory Management
Threads add another dimension to memory management that should not be ignored. This chapter covers memory issues that are unique to multithreaded applications.
3-1 - Avoiding Heap Contention Among Threads
3-2 - Use Thread-local Storage to Reduce Synchronization
3-3 - Detecting Memory Bandwidth Saturation in Threaded Applications
3-4 - Avoiding and Identifying False Sharing Among Threads
3-5 - Optimizing Applications for NUMA - New
Programming Tools
This chapter describes how to use Intel software products to develop, debug, and optimize multithreaded applications.
4-1 - Automatic Parallelization with Intel® Compilers4-2 - Parallelism in the Intel® Math Kernel Library
4-3 - Threading and Intel® Integrated Performance Primitives
4-4 - Using Intel® Inspector XE 2011 to Find Data Races in Multithreaded Code - Revised
4-5 - Curing Thread Imbalance Using Intel® Parallel Amplifier
4-6 - Getting Code Ready for Parallel Execution with Intel® Parallel Composer - Revised
4-7 - Optimize Data Structures and Memory Access Patterns to Improve Data Locality - New
On March 9, 2010 The Parallel Programming Community on the Intel Software Network published a collection of technical papers to provide software developers with the most current technical information on Application Threading, Synchronization, Memory Management and Programming Tools. We look forward to your thoughts and feedback and encourage you to participate in the discussion and ask question in our Threading on Intel® Parallel Architectures forum.
1.1 Motivation
The objective of the Intel® Guide for Developing Multithreaded Applications is to provide guidelines for developing efficient multithreaded applications across Intel-based symmetric multiprocessors (SMP) and/or systems with Hyper-Threading Technology. An application developer can use the advice in this document to improve multithreading performance and minimize unexpected performance variations on current as well as future SMP architectures built with Intel® processors.
The Guide provides general advice on multithreaded performance. Hardware-specific optimizations have deliberately been kept to a minimum. In future versions of the Guide, topics covering hardware-specific optimizations will be added for developers willing to sacrifice portability for higher performance.
1.2 Prerequisites
Readers should have programming experience in a high-level language, preferably C, C++, and/or Fortran, though many of the recommendations in this document also apply to languages such as Java, C#, and Perl. Readers must also understand basic concurrent programming and be familiar with one or more threading methods, preferably OpenMP*, POSIX threads (also referred to as Pthreads), or the Win32* threading API.
1.3 Scope
The main objective of the Guide is to provide a quick reference to design and optimization guidelines for multithreaded applications on Intel® platforms. This Guide is not intended to serve as a textbook on multithreading nor is it a porting guide to Intel platforms.
1.4 Organization
The Intel® Guide for Developing Multithreaded Applications covers topics ranging from general advice applicable to any multithreading method to usage guidelines for Intel® software products to API-specific issues. Each topic in the Intel® Guide for Developing Multithreaded Applications is designed to stand on its own. However, the topics fall naturally into four categories: Application Threading, Synchronization, Memory Management and Programming Tools. Though each topic is a standalone discussion of some issue important to threading, many topics complement each other. Cross-references to related topics are provided throughout.
1.5 Authors and Editors
The following Intel Engineers & Technical experts contributed to writing, reviewing and editing the Intel® Guide for Developing Multithreaded Applications: Henry Gabb, Martyn Corden, Todd Rosenquist, Paul Fischer, Julia Fedorova, Clay Breshears, Thomas Zipplies, Vladimir Tsymbal, Levent Akyil, Anton Pegushin, Alexey Kukanov, Paul Petersen, Mike Voss, Aaron Tersteeg and Jay Hoeflinger
1.6 Early Review of The Intel Guide for Developing Multithreaded Applications from Parallel Programers
Tom Spyrou's opinion on how to tune work assigned to threads from the programming tools paper Curing Thread Imbalance Using Intel® Parallel Amplifier and his experience with detecting when the bottleneck in a program is caused by the bandwidth from main memory in the paper thoughts on False Sharing from the paper Avoiding and Identifying False Sharing Among Threads.
Asaf Shelly discusses the correct use of memory allocations by giving each thread its own Heap for the paper Avoiding Heap Contention Among Threads.
Clay Breshears wrote about The Art of Snow Blowing as it relates to the paper Granularity and Parallel Performance.
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (20) 
| March 17, 2010 6:20 PM PDT
christy | ...ellow... |
| April 2, 2010 8:33 AM PDT
Robert Schultz
| Thanks for publishing this!!! |
| April 14, 2010 7:34 AM PDT
Greg Phillips
| This is awesome! Thanks for publishing. |
| May 11, 2010 6:36 AM PDT
neelmanishankar
| indeed a very good initiative to provide this platform.. great guys... |
| May 17, 2010 1:13 AM PDT
JongChan AHN |
It's awesome, pretty much worth to read it :) |
| November 10, 2010 2:21 AM PST
cod3r
| very informative, thanks! |
| March 9, 2011 4:57 PM PST
Anonymous | Well... where's the url to like this on Facebook?? lol |
| March 10, 2011 4:23 AM PST
ADILMAN.ATD | infortant software fpr our job. |
| March 10, 2011 7:43 AM PST
saikat | this is so usefull...awesome idea |
| March 10, 2011 9:04 AM PST
Ajatshatru | thank's for share this info. |
| March 16, 2011 5:44 PM PDT
jhon | thank's for publisshing this!!!! |
| March 17, 2011 12:20 AM PDT
sourabh | i like this ! |
| March 18, 2011 10:15 PM PDT
ammar | very nice |
| March 25, 2011 9:39 AM PDT
sahil |
very informational stuff....It was very helpful for me thanx guys.. One more thing can i get the pdf version of these articals for reference purposes.thanx |
| May 23, 2011 8:14 AM PDT
southsidesmoka
|
Now...THIS is a NICE piece of writing! Kudos! - CCK |
| June 1, 2011 7:22 AM PDT
kiranauradkar
|
I would like to know the availability of Intel Integrated Performance Primitives & Intel Math Kernel Library in India for i7 processors. |
| November 21, 2011 6:21 PM PST
mfj007
| very good. |
| November 22, 2011 12:17 AM PST
udjin123
| Very well written, thanks a lot |
| December 25, 2011 12:35 AM PST
woshiwuxin
| thanks a lot! :D |
Trackbacks (30)
- Blowing Snow and the Granularity of Parallel Computation – Intel Software Network Blogs
February 19, 2010 12:36 PM PST - Blowing Snow and the Granularity of Parallel Computation
February 19, 2010 5:02 PM PST - Review: Avoiding Heap Contention Among Threads – Intel Software Network Blogs
February 22, 2010 8:51 AM PST - Review: Avoiding Heap Contention Among Threads
February 22, 2010 2:40 PM PST - Review of 2 Performance related Chapters of “The Intel Guide for Developing Multithreaded applications” – Intel Software Network Blogs
March 1, 2010 3:58 PM PST - Review of 2 Performance related Chapters of “The Intel Guide for Developing Multithreaded applications”
March 1, 2010 5:40 PM PST - Intel Guide for Developing Multithreaded Applications
March 4, 2010 5:05 PM PST - Don’t Hinder Concurrency! – Intel Software Network Blogs
March 5, 2010 12:29 PM PST - Don’t Hinder Concurrency!
March 5, 2010 4:41 PM PST - Intel series on developing multithreaded applications | insideHPC.com
March 9, 2010 3:32 AM PST - Parallel Programming Talk #67 – “The Intel Guide for Developing Multithreaded Applications” with Henry Gabb – Intel Software Network Blogs
March 11, 2010 11:18 AM PST - Parallel Programming Talk #67 – "The Intel Guide for Developing Multithreaded Applications" with Henry Gabb
March 11, 2010 12:00 PM PST - Intel publishes new guide to parallel programming « SoftTalk – multicore and parallel programming
March 23, 2010 9:22 AM PDT - Parallel Programming Talk #70 – Thread Optimization on the new Intel Core i7-980X Processor with Intel Marketing Manager Darren Yee – Intel Software Network Blogs
April 20, 2010 1:39 PM PDT - Parallel Programming Talk #71 – Listener Question Show with Professor Tom Murphy from Contra Costa College – Intel Software Network Blogs
April 20, 2010 2:02 PM PDT - Parallel Programming Talk #71 – Listener Question Show with Professor Tom Murphy from Contra Costa College
April 20, 2010 5:20 PM PDT - Parallel Programming Talk #70 – Thread Optimization on the new Intel Core i7-980X Processor with Intel Marketing Manager Darren Yee
April 20, 2010 5:20 PM PDT -
Twitter Trackbacks for
http://software.intel.com/en-us/articles/intel-guide-for-developing-multithreaded-applications/?cid=sw%3Athreadingguid
[intel.com]
on Topsy.com
May 5, 2010 9:38 AM PDT - Load Balance and Parallel Performance | HPC and AI in MIT
July 5, 2010 11:32 AM PDT - Let the Parallel Coding Resume! – Intel Software Network Blogs
August 5, 2010 11:10 AM PDT - Let the Parallel Coding Resume! - News IT&C
August 5, 2010 3:00 PM PDT - How to Avoid Being Pelted with Grapefruit-sized Hailstones – Intel Software Network Blogs
September 24, 2010 4:03 PM PDT - How to Avoid Being Pelted with Grapefruit-sized Hailstones - News IT&C
September 24, 2010 8:00 PM PDT - Intel Guide for Developing Multithreaded Applications | Conceptual Space
October 15, 2011 9:53 PM PDT - It’s here! The Intel Guide for Developing Multithreaded Applications – Blogs - Intel® Software Network
October 27, 2011 5:26 PM PDT - Vector Fabrics Founder and CEO Paul Stravers Discusses and Demos vfEmbedded – PPT #127 – Blogs - Intel® Software Network
November 11, 2011 2:35 PM PST - Vector Fabrics Founder and CEO Paul Stravers Discusses and Demos vfEmbedded – PPT #127 | ServerGround.net
November 11, 2011 3:41 PM PST - Intel Guide for Developing Multithreaded Applications | twit88.com
December 20, 2011 5:14 AM PST - Intel Guide for Developing Multithreaded Applications | nullptr
January 2, 2012 10:34 PM PST - Intel Guide for Developing Multithreaded Applications
May 11, 2012 2:33 AM PDT




Eyal