Solved

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

Posted on 2011-03-15
6
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Assisted Solution

by:Dushyant Sharma
Dushyant Sharma 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
A short article about problems I had with the new location API and permissions in Marshmallow
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

734 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