Monday, March 14, 2011

System Performance Optimization Basics on the Resource Level

Before moving on to optimizing your application, take a look first at infrastructure or resource level whether the problem lies in there. There are four areas that directly attribute to your system performance at the resource level. You should derived your optimizations based on them.

CPU (Central Processing Unit)

Processor speed dictates how many instructions per second can you execute per second which is measured as cycles/second or hertz (i.e 2.3 Ghz). The bigger the number the better the performance. But 1 processor can be used 1 at a time only. There is no such this as percent usage. The CPU utilization percentage you usually see only indicate how long a process was seen at a given time period. Now, parallel processing is common and multi-core CPUs are available. The number of processor cores gives you the number of processes that can be run at the same time. This can be fully utilized if your system uses multi-processing and multi-threading paradigms.


The memory stores or buffers variable data here used in processing. Read and buffer cycle are very fast due to its random access nature but the amount of space is limited and it is non-persistent (data is temporary and is changing all the time). The bigger the amount of data you can buffer, the better performance for your system.

Hard Disk / Data Storage

Your system would want to store data persistently and access it regularly as well. Also, the amount of data which can be stored will usually be many many times more than what your memory can hold. The amount of data you can store however does not dictate performance. The amount of time it takes to lookup data and return for processing is. They are measured by the number of revolutions per minute (RPM) for the lookup (disk I/O) and bus speed (GB/s or amount of data per second. Ordinary hard disks nowadays has a transfer rate of 3GB/s - need citation). There are now new technologies in the market that use the same random access properties of a memory thereby faster and better performing. They are called solid-state drives (SSD). SSD drives are still very expensive at the time of writing.

With those who have been working and developing applications for some time, they would most probably encountered disk contention conditions wherein the disk I/O or lookup boundaries are already saturated. No matter how fast your CPU and how big your memory is, the resulting bad performance will still be the same if this is encountered. Another important optimization point here is to make sure you efficiently utilize your disk from your application.


Distributed system architecture (i.e High-performance computing, service-oriented architecture etc) is the way to go now and in the future. There are just too many limiting factors in a single box. Think of it that a supercomputer is in reality is a set of thousands of computers rolled into one via a network link so fast it is almost a single machine when used in an operating system that binds them together. InfiniBand (more than 300GB/s transfer rates, PCI Express v3 at most is 128GB/s) is used for super computers. The day-to-day enterprise doesn't usually need them though a Gigabit Ethernet LAN is usually sufficient but it should have low latency and if possible no collisions at all. By knowing how much you network can take or how much traffic it has, you can strategically determine what optimizations you need to perform.
  • Related Links Widget for Blogspot

No comments: