File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet performance optimization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet performance optimization" Watch "servlet performance optimization" New topic

servlet performance optimization

gigel chiazna

Joined: Jul 09, 2001
Posts: 17
how to test servlet performance?
I have about 5 servlets using one mysql database.
some are used as data feeds serving users, some
to operations on the database. I want to test
how many users a configuration can hold.
are there any tools for that?

<a href="" target="_blank" rel="nofollow">Stock Market Java Applets</a>
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
I used the HttpClient package in the Jakarta Apache "commons" collection to eumulate multiple clients in a load test. See
There is also a HttpUnit testing package - see but I have not used it.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
Check out JAMon (Java Application Monitor). It can measure performance AND scalability (you can tell how much performance degrades as the number of simultaneous requests increases). It is very easy to use and when used in conjunction with a load test tool can provide much useful info. One nice thing about JAMon is that it's performance impacts are small enough that it can be used in a production environment.
You can read about it and download it at: - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Ryan Bailey
Ranch Hand

Joined: Feb 26, 2002
Posts: 134
Hi gigel,
Two good performance tools that I have used are OptimizeIt and JProbe. Both are great for testing Servlets as well as stand-a-lone Java programs.

Java: The power, elegance, and simplicity of a hand grenade
Michael Fitzmaurice
Ranch Hand

Joined: Aug 22, 2001
Posts: 168
You may also find JMeter useful (and it is open source).

"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
Jon Wilson

Joined: Oct 15, 2003
Posts: 14
OpenSTA is an excellent tool if you don't mind testing on a Windows machine. It has many features to simulate multiple users accessing a web-based application. Best of all, it's open source. Good luck!

Mensa member, Certified bartender, Created the Internet (along with Al Gore), Speak 9 languages fluently (this includes pig latin), Spelling Bee Winner, 8th Grade Math Award, Can hold breath under water for more than 2 minutes
I agree. Here's the link:
subject: servlet performance optimization
It's not a secret anymore!