Solved

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

Posted on 2011-03-15
6
397 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 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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 Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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