Server Performance Tuning Habit #8: Use the Right Tool for the Job

Here’s the 8th follow-up post in my 10 Habits of Great Server Performance Tuners series. This one focuses on the eighth habit: Use the Right Tool for the Job.


There are many different reasons why people undertake performance analysis projects. You could be looking to fine-tune your compiler-generated assembly code for a particular CPU, trying to find I/O bottlenecks on a distributed server application, or trying to optimize power performance on virtual server, just to name a few. As I discussed in habit 2, there are also different levels where you can focus your investigation – mainly the system, application, and macro or micro-architecture levels.

It can be overwhelming thinking of all the different ways to collect and analyze data and trying to figure out which methods apply to your particular situation. Luckily there are tools out there to fill most needs. Here are some of the things you should consider when trying the find the tool(s) that are right for you.

  1. Environment – Many tools work only in specific environments. Think about your needs – are you going to be performing analysis in a Windows or Linux environment, or both? If you are analyzing a particular application, is it compiled code, Java*, or .NET* based? Is the application parallel? Are you running in a virtual environment?

  2. Layer – Will you be analyzing at the system, application, or micro-architecture level, or all 3 ? At the system level, you are focusing primarily on things external to the processor – disk drives, networks, memory, etc. At the application level you are normally focused on optimizing a particular application. At the micro-architecture level you are interested in tuning how code is executed on a particular processor’s pipeline. Each of these necessitates a different approach.

  3. Software/Hardware Focus – Finally consider whether you will mainly be tuning the software or the hardware (platform and peripherals) or both. If you plan to do code optimization, you will need a tool with a development focus.

  4. Sampling/Instrumentation - For software optimization tools in particular, there are 2 main methods used to collect data. Sampling tools periodically gather information from the O/S or the processor on particular events. Sampling tools generally have low overhead, meaning they don’t significantly increase the runtime of the application(s) being analyzed. Instrumentation tools add code to a binary in order to monitor things like function calls, time spent in particular routines, synchronization primitives used, objects accessed, etc. Instrumentation has a higher overhead, but can generally tell you more about the internals of your application.

After determining your specific needs, take a look at the tools out there (you might start with the lists available on wikipedia or at HP’s Multicore Toolkit.) Of course I recommend you also check out the Intel® Software Development Products. There are several specifically for performance analysis:

  • Intel® VTune™ Performance Analyzer works in both Windows* and Linux* environments and provides both sampling and an instrumented call graph. The sampling functionality can be used to perform analysis at all levels – system, application, and micro-architecture. It is multi-core aware, supports Java* and .NET* and also allows developers to identify hot functions and pin-point lines of code causing issues.

  • Intel® Thread Profiler is supported on Windows*. It is a developer-focused tool that uses instrumentation to profile a threaded application. It supports C, C++, and Fortran applications using native threading, OpenMP*, or Intel® Threading Building Blocks. Intel® Thread Profiler can show you concurrency information for your application and help you pinpoint the causes of thread-related overhead.

  • Intel® Parallel Amplifier Beta plugs into Microsoft* Visual Studio and allows C++ developers to analyze the performance of applications using native Windows* threads. It uses sampling and a low-overhead form of instrumentation to show you your applications hot functions, concurrency level, and synchronization issues.

Finding the right tool for your situation can greatly reduce frustration and the time needed to complete your project.  Good luck, and keep watching The Server Room for information on the last 2 habits in the coming months.