About Me
this is my first mobile accountThe Grinder is an easy-to-use Java-based load generation and performance measurement tool that adapts to a wide range of J2EE applications. If you have a J2EE performance measurement requirement, The Grinder will probably fit the bill.Paco Gómez developed the original version of The Grinder for Professional Java 2 Enterprise Edition with BEA WebLogic Server (Wrox Press, 2000). I took ownership of the source code at the end of 2000 and began The Grinder 2 stream of development. The Grinder is freely available under a BSD-style license.This article will introduce only the basic features of The Grinder. I encourage you to download the tool and try it out. The recently published J2EE Performance Testing by Peter Zadrozny, Ted Osborne, and me (Expert Press, 2002) contains much more information about The Grinder.Where to Obtain The Grinder
You can download The Grinder distribution from The Grinder home page at http://grinder.sourceforge.net. The examples in this article were run using The Grinder 2.8.3.There are some mailing lists that you can join to become a part of The Grinder community:* grinder-announce: Low-volume notifications of new releases
* grinder-use: The place to ask for help
* grinder-development: For those interested in developing The GrinderSo, What Is The Grinder? In short, The Grinder is a framework for generating load by simulating client requests to your application, and for measuring how your application copes with that load.Typically, you will have begged, bought, or borrowed a number of test-client machines with which to test your application. You can use The Grinder console to control many processes across your test-client machines, each running many threads of control. The Grinder is a pure Java application, so there's a wide variety of platforms that you can use.Three types of processes make up The Grinder:* Agent processes: A single agent process runs on each test-client machine and is responsible for managing the worker processes on that machine.
* Worker processes: Created by The Grinder agent processes, they are responsible for performing the tests.
* The console: Coordinates the other processes and collates statistics.Each of these processes is a Java Virtual Machine (JVM) and can be run on any computer with a suitable version of Java installed.To run a given set of tests, an agent process is started on each test-client machine. This process is responsible for creating a number of worker processes. Each loads a plug-in component that determines the type of tests to run and then starts a number of worker threads. For example, with the provided HTTP plug-in each test corresponds to an HTTP request to a URL. Each of the worker threads uses the plug-in to execute tests.The grinder.properties file is a configuration file that is read by the agent and worker processes, and the plug-in. This file contains all the information necessary to run a particular set of tests, such as the number of worker processes, the number of worker threads, and the plug-in to use. For most plug-ins, the file also specifies the tests to run and can be thought of as the "test script." For example, when using the HTTP plug-in, the grinder.properties file contains the URL for each test.The agent process and the worker processes read their configuration from grinder.properties when they are started (see Figure 1). I usually put the grinder.properties file on a shared network drive so I don't have to copy it to each of the test-client machines.