By Robert Dominy – Engineering Director – ADP Cobalt Display Advertising Platform
If you are writing a high performance web application and attempting to evaluate performance, one thing you should be aware of is the effect of Linux context switching. Under Linux, the system scheduler allocates time slices to running processes and as processes exceed their allocated slice, they can be interrupted to give time to other processes. These context switches can be expensive when you measuring performance in the tens of milliseconds or less.
On a production server that is moderately busy (handling about 100 HTTP requests/sec), a series of timing tests were conducted. The server is a virtualized system running CentOS 6.2 with 4 CPUs and 32GB of RAM allocated to the virtual. It runs at loads ranging from about 0.5 to 1.5.
A simple loop was implemented in PHP where the timed task was basically this:
View original post 529 more words