You are here

Performance Testing

Submitted by multiplier on Sun, 02/26/2017 - 21:28

Any product development needs a good testing team around to check for functionality, robustness & stability. Just testing does not make a product great. Without due effort in testing, its impossible to assure product free of malfunctions, failures and robustness in long hour operations.

I will be concentrating on performance testing. When we talk of performance testing, what all we mean. Performance testing is a technique to check product / system behaviour under various load conditions. As the test goes on over the period of time, you may observe certain system level issues like increase in memory usage, swap memory used, increase in socket counts, increase in file descriptors, zombie processes etc. These issues slowly affects system and performance of system reduces or system cease to operate.

Various system attributes / parameters need to be tracked during performance testing are CPU, used memory, sockets used, file descriptors used, any zombie process etc.

Performance testing can be categorised as below

  • Load testing - You can test product with certain load. You might have heard of cps (calls per second), tps (transaction per second), rps (rates per second) kind of terms. These all are units to measure the load generated by a load testing tool. Testing can continue for several hours or days and check system attributes / parameters as test continues. These system attributes / parameters are cpu, cps, tps, rps etc. In addition to that you may like to check number of sockets, file descriptors, zombies etc in system. Also you may like to check if any swap memory is used/ All these provides how system is performing at certain load with long hour testing.

  • Stress testing - Stress testing is similar to load testing but with maximum possible load. The cps / tps / rps will be at maximum possible value for system under test. As the test continues, you may like to check system attributes / parameters. This provides bench marking data sought by product users / clients.

  • Soak testing - Same as load testing. Load testing you can do for either less time or more time, however soak testing mostly deals with long hour uninterrupted load testing with certain cps / tps / rps. As the test continues, you may like to check system attributes / parameters. If system attributes / parameters indicate good health of system, you will be sure of product robustness for long hour operations.

  • Spike testing - When we talk of cps / rps / tps, it is something like constant load in system. For 10 calls per second for 2 hours means, throughout 2 hours 10 calls per second is initiated by a tool on system under test. Think of real time system, sometime system may get 1 calls per second and suddenly gets 10 calls per second or even higher. Can system cope up with sudden increase in load? The sudden increase in load or increase in users of system can be met or not is assured by spike testing. You may like to do spike testing for a certain duration and keep checking system attributes / parameters time to time to assure if system health fine.

Now in next page, I will explain with examples how to check CPU, swap memory used or not, sockets used, file descriptors used etc. If you want to check it yourself, I suggest you keep a linux machine (Ubuntu 14.04 LTS 64 bit) ready so that you can execute commands / scripts as you continue reading.