Profiling & Performance analysis
Introduction
The following article will focus on tools, best practices, base knowledge helful for working out performance optimizations.
Content
The project
Lets first create a small project, we will use it as an example server we are going to profile.
Our project will sit on top of tomcat, a standard restful service, accepting requests, performing actions, returning json results.
CPUUser CPU / System CPU
CPU Load Average
CPU
When you profile a server in a search of high cpu consumption areas you should first understand which cpu consumption are you looking at. Using the tools shown below note that its possible to check out the user cpu and system cpu. Its important to understand the differences between the two. The user cpu is the cpu as directly consumed by apps running on linux, some of the app calls would be directed into the kernel for kernel services and operations. The cpu used by the kernel is called system cpu.
lets start by running sar command to check out the cpu on a linux machine. (I will describe further in more details the sar command, for now, flow with me..)
I'm going to use the following servlet app on tomcat7 for tests:
|
Comments