Wednesday, April 11, 2007

Grind Your Server

One important thing about working with high volume system is to perform load tests/stress tests early on during development. As critical as to start multiple threads to perform parallel processing, it's absolutely important to make sure that you don't create too many threads that JVM or OS cannot handle. You also want to make sure that all objects will be gc'ed. Java gc is a double edged sword, one which can ease the software development, and at the same time can cause memory leak. Instead of waiting for the system to crash or lock up during peak traffics, you can use Grinder to perform load test.
Grinder is made of two parts: grinder console and grinder scripts.
The grinder console is a GUI based admin tool. You can use grinder console to start/stop test scripts, to start/stop gathering test data and to monitor runtime system performance.
The grinder scripts are based on Jython. You can either create a Jython script that talks to your server directly or to wrap around a Java class that connects to the server.

No comments: