Now that manufacturers are offering a wide range of core processors, single-threaded performance in new processors may be relatively prosaic. That means that the pressure on software developers to improve application performance by better leveraging parallelism is even greater.
Parallel programming is a challenging task for many reasons, but I just want to focus on the performance aspects of parallel applications in this article. Multithreaded applications are not only a common cause of sequential inefficiencies (such as inefficient algorithms, slow caching behavior, excessive I/O), but may also have parallel performance bugs. Parallel performance and scalability can be constrained by load imbalances, excessive synchronization overhead, unintentional serialization, or thread migration.
In the past, to understand such performance bottlenecks, expert-level developers are required to do a lot of testing and analysis. Even the best of programmers, performance optimization is a tedious and time-consuming process.
This situation should be improved. Visual Studio 2010 contains a new profiling tool: Concurrency Visualizer, which greatly reduces the burden of parallel performance analysis efforts. In addition, concurrency Visualizer can help developers analyze their sequential applications to discover the possibility of executing these applications in parallel. In this article, I'll outline the features of concurrency Visualizer in Visual Studio 2010, and give you some hands-on guidance on how to use them.
CPU Utilization
The Concurrency visualizer contains several visualization and reporting tools. There are three main views: CPU utilization, threads, and core views, respectively.
The CPU utilization view shown in Figure 1 is the place to start using the Concurrency Visualizer. The X axis shows the length of time from the start of the trace to the earlier moments in the end of the application activity or the end of the trace. The Y-axis shows the number of logical processor cores in the system.
Figure 1 CPU Utilization View