Microarchitecture-level Tuning

The third level of performance tuning is microarchitecture-level tuning. The goal of microarchitecture-level tuning is to speed up the application's performance by improving how the application runs on the processor. This type of tuning is especially relevant for processor-intensive applications. . Unless you know that your application is very processor-intensive, use System-level Tuning and Application-level Tuning  to improve processor utilization before trying microarchitecture-level tuning.

The general methodology for microarchitecture-level tuning:

  1. Identify code regions that have a high impact on application performance.  

  2. Analyze the execution of those code regions on the target microarchitecture.

  3. Identify microarchitecture level performance problems.

  4. Determine how to avoid them to improve performance.

Identify code regions that have a high impact on application performance:

  1. Use Sampling wizard to create an Activity with the sampling data collector. See The Tuning Methodology for Specific Goals for more details on this step, and the Intel(R) Optimization manual for your processor to understand which processor events to collect for your target system.

  2. Look for resource contention problems. If your application is multithreaded and if your goal is to improve scaling (or to speed up the application) on a system with Hyper-Threading Technology, you may wish to check for resource contention problems. Shared resources on HT Technology systems include Trace, 1st and 2nd level caches, store and load buffers. To verify if a resource contention problem exists, turn off Hyper-Threading Technology. If you see performance improvement, the problem exists.

  3. Look for time-based hotspots. A problem that has only a moderate impact on the entire workload may have a severe impact on particular time phases within the workload. Viewing the severity of the problem over time will reveal whether this is occurring - understanding this may help you determine how to solve the problem.

Tip