Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-15
6
Medium Priority
?
407 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:Dushyant Sharma
Dushyant Sharma earned 400 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 800 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 800 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
In this post we will learn different types of Android Layout and some basics of an Android App.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

782 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