1. Ideal tool for benchmarking a typical j2ee application consisting of JSP/Servlets/JDBC/EJB etc. Objective of benchmarking my application, is to see how much concurrent users it can withstand w.o breaking down. 2. Looking for lightwt profiling tool
I have taken my postings from the following java forum thread. In it I discuss what I consider to be an essential tool for tuning and monitoring J2EE apps. It has mentioned in the O'reilly books "j2ee best practices" and "java performance tuning" http://forum.java.sun.com/thread.jsp?forum=31&thread=426863 Here are my postings: 1) Measuring performance and usage in your production environment is absolutely critical in the web world. Also do not start tuning unless you have performance numbers that prove that the tuning is worth your time. You here it time and time again, but DO NOT OPTIMIZE PREMATURELY! I can't imagine developing a web application without using JAMon, but then I wrote it . JAMon is a fast, free, performance tuning, monitoring API that was referenced in O'Reilly's "J2EE Best Practices". Go to http://www.jamonapi.com to see all the ways JAMon can help you. Best of all it is extremely simple and so you will be able to start monitoring within minutes. Steve 2) For most of my applications the database is the biggest bottleneck. 80%-90% of my apps performance is wrapped up in SQL. Check out http://www.javaperformancetuning.com for just about anything you would want to know about java performance tuning. steve - http://www.jamonapi.com 3) For a live view of the JAMon stats check out: http://www.ssouza.com/JAMon/JAMonAdmin.jsp Also, because the JAMon start method takes any String, you can monitor things based on runtime data. For example page hits by user could be monitored with the following: // note dynamic monitoring label which will show up in the report MonitorFactory.start("pageHits."+userName); JAMon tracks hits, avg time, total time, min time, max time, std deviation, active, average active, max active, last time executed and more. The "active" stats measure simultaneous request. For example say you have a monitor that measures total site page hits by executing the following monito for every page in your site: MonitorFactory.start("pageHit"); For example, if there are 50 users with out-standing page requests then "active" would be 50. This is very handy and allows you to correlate your sites performance to concurrent requests (i.e. it measures scalability - performance under load). For performance measuring alone JAMon is worth the price (free), but it can also help you measure scalability, how users use your system and much more. For more about JAMon see http://www.jamonapi.com Steve
i dont think your tool will solve problems esp in such situation. 1. customer facing pef. problem in production env 2. your tool needs adding few lines of code. ( which I feel is major drawback for such situation). many customers may not want to add code, even developers might feel lil bit apprehensive in adding extra code to monitor perf. a j2ee app might consists of many components jsp,servlets,ejb, dao, etc etc... in order to benchmark my app, i dont want to go into each component and add few lines of code
posted 17 years ago
<<your tool needs adding few lines of code. ( which I feel is major drawback for such situation).>> If you are adding to much monitoring you are probably not coding your application right in the first place. For example in my applications I monitor all servlets and jsp's by putting the monitor in a controller servlet or servlet filter. If you find yourself putting monitoring code in every jsp you are probably doing something wrong. I'd start out by measuring pages in a servlet filter (2 lines of code - a start and a stop) and calls to jdbc. Use this info to see where else you need to monitor. For JDBC calls I create a thin wrapper for jdbc calls such as getConnection() that adds monitoring. So again you monitor in one place and any subsequent jdbc calls are monitored. I think this is a good practice whether you monitor or not and takes a few minutes and you can reuse this class for any future projects. JAMon also monitors production code and has little performance impact and can be enabled/disabled at run time. Plus it measures a lot more than performance. There are other benefits, but I'll let you read the manual at http://www.jamonapi.com for that.
Originally posted by sowmya thiru: a j2ee app might consists of many components jsp,servlets,ejb, dao, etc etc... in order to benchmark my app, i dont want to go into each component and add few lines of code
I agree! I've done tons of monitoring using Borland;s "OpimizeIt!". This tool allows you to plug into any app - no matter where it's running - and see cpu utilization, object counts, thread locking etc.... It may cost money, but it's well worth it, especially in the enterprise. Go to www.borland.com and look for OptimizeIt. It'll integrate with ANY appserver.