Running Alot of Agents
In order to test scalability of the server, we want to be able to run hundreds of agents without incurring the cost of hundreds of physical machines.
AgentSpawn
agentspawn contains a Maven POM as well as an ANT script that you can use to run multiple VMs, which can have multiple agents running within it. Assuming you have machine with a lot of memory and CPU capacity, you could run a good number of agents using this mechanism.
 | You should make sure you perform a full trunk build of RHQ so you have an up-to-date RHQ Agent built in modules/enterprise/agent/target/ - it will be used as the template agent that will be spawned by these agentspawn tools. |
You need to "mvn install" in the agentspawn module to build the jar file containing the class that will spawn its internal agents. This jar artifact built by mvn is standalone and can be run simply by using the command java -jar target/XXX.jar where XXX.jar is the name of the jar built by this mvn module. Run that command without any command line arguments to see its usage help message as well as some help text that shows you what system properties you can set to configure its behavior (like how many internal agents it should spawn, what ports it should listen to, etc). You should also read the AgentSpawn javadoc for more information.
If you only want to run one VM with multiple agents, the above is all you need to run. You simply build the jar and run it, configuring it as you see fit via system properties and command lines arguments. There is even some sample scripts for you to use (one-vm.[bat,sh]).
If you want to run multiple VMs (each with multiple agents inside them), you need to next use the ANT script found in the scripts directory. Read the .properties and .xml files found here for details on how to run it and what settings you can set to define your spawned agents' configurations. Execute within the scripts directory the command "ant -projecthelp" for usage help.