Solved

How to test the performance of a multi-threaded applicaiton?

Posted on 2011-03-15
6
391 Views
Last Modified: 2012-05-11
Hey,

       I was working on a parallel search engine in Java, and I got a working version of the code, but I was trying to figure out a way to measure the performance of the code.  After a few google searches, the best link I found was http://developers.sun.com/solaris/articles/javapps.html .  

I was wondering if there was any free open source programs, or other such API's that test the performance of multi-threaded Java programs.

Appreciate any help on this.
0
Comment
Question by:errang
6 Comments
 
LVL 14

Assisted Solution

by:ddsh79
ddsh79 earned 100 total points
ID: 35137554
have you tried net beans profiler. i have been using it a lot and it does help.
0
 
LVL 5

Assisted Solution

by:paulqna
paulqna earned 200 total points
ID: 35141183
Freeware tool Jmeter has concurrent thread and group thread sampling.
0
 
LVL 8

Expert Comment

by:Volox
ID: 35145748
What platform are you on?

When I'm running this type of thing on Windows I tend to use windows performance counters.  There is a lot of good information you can get about how many threads, how much memory, and various other helpful information you can get form the standard perf counters.

The other approach I've used is to have a static test scneario that provides a 'known quantity' set of test cases and then run that through measuring average processing time etc.  The 'how' of getting average times is generally writing code within your application that captures the data and logs it out somehow - either as a time for each item or as a captured average witin the application.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:errang
ID: 35148465
>>What platform are you on?

I use a Mac... but if there are better tools built into Windows, I can test this on Windows.

>>When I'm running this type of thing on Windows I tend to use windows performance counters.

Sorry, I don't know what these are?
0
 
LVL 8

Accepted Solution

by:
Volox earned 200 total points
ID: 35150054
Windows performance counters provide a system for monitoring performance that is fairly lightweight and built into the operating system.  There are a bunch of counters that allow you to see all the underlying performance aspects of the operating system, such as network bytes sent / bytes received, disk I/O measurements, processor information, memory commits, etc.  You can also build custom performance counters that allow you to measure your won metrics using the provided system.

Since Java doesn't have operating system specific functionality, it is a little harder to do custom performance counters in Java.  If you decide you want to try that, here is an article on it http://www.developer.com/java/data/article.php/3087741  But I can't speak to whether it works or not since I've never tried it.  Usually the operating system perf counters are good enough for what I've been doing in java.  (Part of that being because when I've been asked to do really high performance work it typically gets done in C#)

The tool you use to see all these counters is Performance Monitor (often referred to as Perf Mon).  It is under the 'Adminstrative Tools' on the start menu.  There are plenty of resources online about how to use it and what counters are useful versus which ones you probably don't care about.  Here is the techNet article to get you started... http://technet.microsoft.com/en-us/library/cc749249.aspx

Once you have the counters selected, you can setup a performance counter log that you can use to capture them to a file so that you can go back and review them over the period of time you were running your test.  The advantage here is that you can profile the performance of just your process (in this case java.exe) and time correlate the results to what you were doing in your test - which is way more effective than watching the CPU and memory meter as you go along (which is what I've seen some people do for perf testing).

0
 

Author Closing Comment

by:errang
ID: 35150578
Thanks a lot!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now