Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Stress Testing Cometd (Jetty implementation)

These instructions show you how to stress test cometd from jetty 6.1.9 running on unix. The same basic steps apply to running on windows or mac and I'd be happy to add details instructions if somebody wants to contribute them.

The basic steps are:

  1. configure/tune operating system of test client and server machines
  2. install, configure and run jetty server
  3. run jetty bayeux test client
  4. interpret the results.

Configure/Tune operating system.

The main change needed to the operating system is that it needs to be able to support the number of connections (== file descriptors) for the test on both the server machine and the test client machines needed.

For a linux system, the file descriptor limit is change in the /etc/security/limit.conf file.
Add the following two lines (or change any existing nofile lines):

There are many other things that can be tuned in the server stack, and the zeus ZXTM documentation gives a good overview.

Install, configure and run Jetty

Jetty installation is trivial. See Downloading Jetty, Installing Jetty-6.1.x and Running Jetty-6.1.x.

For the purposes of cometd testing, the standard configuration of jetty (etc/jetty.xml needs to be edited to change the connector configuration for:

  • increase the max idle time
  • increase the low resources connections.

The relevant updated section is:

Jetty comes with cometd installed in $JETTY_HOME/webapps/cometd.war.
To run the server with additional memory needed for the test, use:

You should now be able to point a browser at the server at either:

Specifically try out the cometd chat room with your browser to confirm that it is working

Run jetty bayeux test client

The jetty cometd bayeux test client generates load simulating users in a chat room. To run the client:

The client has a basic text UI that operates in two phases: 1) global configuration 2) test runs.
An example global configuration phase looks like:

The Enter key can be used to accept the default value, or a new value typed and then press Enter. The parameters are their meaning are:

  • server - The host name or IP address of the server running Jetty with cometd
  • 8080 - The port (8080 unless you have changed it in jetty.xml)
  • context - The context of the web application running cometd (cometd in the test server).
  • base - The base bayeux channel name used for chat room. Normally you would not change this.
  • rooms - The number of chat rooms to create. This will combine with the number of users to determine the users per room. If you have 100 rooms and 1000 users, then you will have 10 users per room and every message sent will be delivered 10 times. For runs with >10k users, 1000 rooms is a reasonable value.
  • rooms per client This allows a simulated user to subscribe to multiple rooms. However, as these are randomly selected, values greater that 1 will mean that the client will not be able to accurately predict the number of messages that will be delivered. Leave this at 1 unless you are testing something specific.
  • max Latency If the latency for delivering a message is greater than this value (in ms), abort the test.
  • No labels
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery