advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Tutorials : JMeter :

The Third Application

The final application that we’ll test is a mixture of the two others, it’s a browser application using Struts to invoke the DVD web service system we have just tested. The response times will therefore be higher than times from the first two applications. Again we’ll test with a single thread and we’ll loop 100 times. The results are these:

Not a big surprise. The numbers are somewhat higher than the web service application. The test setup is a bit artificial. There’s only one user, so the numbers are the best (lowest) that can be expected. But what happens if we put 30, 50 or 100 users on the applications? Let’s finish by looking a bit into this rather complex area.

Remote testing

If you want to get realistic numbers for a load test then it’s important that the computer where JMeter runs has enough power to handle sending requests and receiving responses at the speed you’ve specified. You shouldn’t therefore run JMeter on the same computer as the web server, as we’ve been doing in this article. Even when JMeter is running on its own computer, there might not be sufficient resources. A good indicator of whether or not the JMeter computer is powerful enough is to watch it’s cpu usage. If it goes near 100% then you will probably not get accurate results.

One thing that’ll slow JMeter down is if you have many listeners active. Use only a simple listener like the Aggregate Report listener or write the responses to a file. All of the listeners have a field where you may enter the name of a file to record to. Later, when you want to see the results from your recording file, you simply enter its name in any of the listeners "file field" and you’ll get a report shown. This is a nice feature.

JMeter also has a "Batch" mode, or GUI-less mode, where you must give the name of a file containing a test plan and the name of a file to store the results. The format of the command is this:

jmeter –n –t<name_of_test_plan_file> -l<name_of_log_file>

If you don’t want to work without the GUI, you may run JMeter in "Server mode". This is a setup where JMeter is run on two computers. One runs the GUI and the other—the JMeter server—runs the communication to the web server (and to the JMeter client).

Here’s how you setup this configuration (see also JMeter’s User Manual, chapter 10).

On the JMeter Server computer you must first start the "RMI Registry application" that’s part of the JDK. You’ll have to put these three jars in the CLASSPATH first:

  • JMETER_HOME/lib/ext/ApacheJMeter_core.jar
  • JMETER_HOME/lib/jorphan.jar
  • JMETER_HOME/lib/logkit-1.0.1.jar

Now locate and run the rmiregistry application in the JDK bin directory. No parameters are needed.

Then start JMeter on the same computer:

jmeter –s

The "s" indicates that it runs as a server.

On the JMeter client computer you must first enter the IP address of the JMeter Server into the jmeter.properties file found in the bin directory. Locate these lines:

# Remote Hosts - comma delimited
remote_hosts=127.0.0.1

Insert the IP number of the JMeter Server instead of 127.0.0.1. You may now start JMeter in the normal GUI mode. You enter your test plan just like you’re used to, but when you’re ready to run, you select Remote Start from the menu:

Again, you should observe the load on the JMeter Server to see that it’s not the bottleneck in your setup.

I haven’t tried it myself, but the User’s Manual mentions that you may run more than one JMeter server from the same JMeter client. This would surely help putting a high load on your web server.

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Avaya Developer Showcase
 MSDN Spotlight
 PHP for Windows Showcase
XML error: undefined entity at line 34
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

IBM Brings Developers Into the Cloud
Apache at 10: You Can't Buy Us
Microsoft's CodePlex Foundation Moving Forward
Apple Claims 100,000 Apps, Google Analyzes Them
Nokia Latest to Play Opera Mobile 10 Browser
PayPal Opens Up Payment Platform to Devs
Ubuntu Linux 9.10 'Karmic Koala' Starts Its Climb
IBM Links Rational Developer Tools, Tivoli Apps
Libraries Give Vista Apps a Windows 7 Look
Ubuntu: The 'Default Alternative' to Windows?

Delivering Web-based Embedded Fonts in CSS 3
Adobe Helps PHP Developers Create Rich Internet Applications
Java Developers Finding a Home at Adobe Flex
Virtualization Delivers a Dynamic Infrastructure
Consuming XML Web Services in iPhone Applications
Build a More Agile Business with IBM
POJO-Based Solutions for LDAP Access: One Good, One Better
IBM Offers Enhanced Measurement and Management for Energy Usage
IBM Helps Transformation to an Information-Based Enterprise
Top Five Touch UI-Related Design Guidelines

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs