cancel
Showing results for 
Search instead for 
Did you mean: 

Tools for profiling J2EE apps

detlev_beutner
Active Contributor
0 Kudos

Hello out there,

we are just wondering about the possibilities to track down performance issues concerning time/memory. Mario Kabadiyski from SAP has already stated that the problems with the well-known toolsets JProbe and OptimizeIt are known, and that inside SAP, some different tools are taken, some of them not determinded for publish use yet (like "Sherlok" for memory debugging). Equivalent tools like the ones stated above do not exist for usage with the J2EE Engine.

So my question to the rest of the developers is: Does anybody know of concrete plans about supporting toolsets like OptimizeIt / JProbe / JProfiler? If not, does SAP realize what big disadvantage it means today not to have such tools at hand?

Or does anyone know of plans from some tool manufacturer to support the SAP J2EE Engine? (I've already asked Quest (JProbe), but they gave this question further to the product management, and since this, no more info is replied.)

This situation should change, if SAP reallys wants to play a major role in the AppServer market, where people decide for SAP not only for having a R/3 system and therefore some connections to this company...

Even if the problem technically should be somehow on the tool manufacturer side, it should be an effort to work together with them to support the SAP J2EE engine. (JProbe once has supported InQMy, but that's now history.)

Thanks for any info or hint,

Detlev

Accepted Solutions (1)

Accepted Solutions (1)

former_member197561
Active Participant
0 Kudos

Dear Detlev,

All previous answers present valid tools and recommendations from the colleagues who refer to different periods of the development of SAP Java strategy.

Since 2011 all recent and older versions of SAP Java Software are running on top of SAP JVM.

SAP JVM Profiler

http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/a0a67d7d-36e9-2a10-3a99-94fc8caaea0e

is the recommended tool for profiling memory, CPU, I/O and synchronization issues for single request execution.

Wily Introscope is the recommended tool for under load and prodcution analysis.

Best regards,

sylvia

Answers (5)

Answers (5)

Former Member
0 Kudos

we recently started doing some profiling of an internet sales application under the web app server 6.20, with eclipse and the eclipse profiler plugin (http://sourceforge.net/project/showfiles.php?group_id=48823&package_id=71547).

it did take a little hacking to make it work, though. this is kind of a long post, i'm afraid, but i'm hoping it will be useful to at least someone out there. i figured more detail would be better than less...

one caveat is that for development, i have the web app server and internet sales installed on my desktop. i use eclipse for editing java and jsp files, with an eclipse project set to the web root. so i'm not sure how this could work for those who develop against a server.

the profiler plugin requires the java cryptography extension (jce) to work. it's not part of java 1.3, which internet sales requires, so you have to install it. there is a good page at sun that helped me get it set up (http://java.sun.com/products/jce/jce122_install.html). you have to use option 1 on that page, and make it an "installed" extension. basically it means copying a couple of jars to <java-home>\lib\ext and editing a file to register it as a security provider.

download and install the eclipse profiler plugin. http://eclipsecolorer.sourceforge.net/index_profiler.html has directions on how to do it. once that's done, copy commons-lang.jar, jakarta-regexp.jar and profiler_trace.jar from the profiler plugin directory <eclipse>plugins\ru.nlmk.eclipse.plugins.profiler into the same directory as go.bat.

the profiler install page referenced above has directions on how to profile tomcat or jboss, but it refers to classpaths that are obviously different than the ones for sap's web app server, so you'll have to change the syntax they provide somewhat. the lines you will add to go.bat will vary according to what classes you would like to profile. profiler supports an argument that uses package name pattern matching to know which things to look at. if you don't specify any, then profiler will try to profile the entire j2ee engine, which is interesting to watch until it brings down your machine. on my system, at least, it was too resource-intensive to do that. ymmv.

save go.bat as a new file called go_profiler.bat or whatever and add these things:

right after the argument

-Xmx%MEMORY%

and before the argument

-Dmemory.manager=%MEMORY%

i added the argument to call profiler:

-XrunProfilerDLL:1 -Xbootclasspath/a:jakarta-regexp.jar;profiler_trace.jar;commons-lang.jar

then right after the argument

-Djavax.rmi.CORBA.UtilClass=com.inqmy.system.UtilDelegateProxy

and before the start class invocation

com.inqmy.boot.Start

put the arguments to tell profiler where to look:

-D__PROFILER_PACKAGE_FILTER=__P__com.yourcompany; -D__PROFILER_TIMING_METHOD=1

the profiler install page tells what these arguments mean.

whew! still here? good! now all you have to do is open up the profiler perspective in eclipse, and choose the menu items Run > Run... in the resulting dialog, create a new Remote Profiler configuration, and set the hostname of the server, and the eclipse project that points to your web root. (there are lots of places to enter other options and set packages to profile and stuff, but i don't think they have an effect. you're specifying those params with the lines you add to go.bat. the plugin just connects to the app remotely instead of launching the jvm itself.)

fire up a shell and run go_profiler.bat. when it's done starting up, go to eclipse, show the profiler perspective, and you should be able to do Run > Run..., choose the Remote Profiler configuration you created, click the Run button, and profiler should show you some stuff.

hopefully this helps someone...

Former Member
0 Kudos

Hi Detlev,

I tried Optimizeit and JProbe and yes, at least it isn't easy to get them running on WAS 6.20.

Then I did some browsing and ended up trying http://www.yourkit.com and it was extremely easy to setup and works like a charm.

It does not have as advanced features as the two tools mentioned above, but at least it covers CPU and Memory usage so that I can pinpoint exactly what is happening in the application very easily.

Cheers,

Kalle

detlev_beutner
Active Contributor
0 Kudos

Hi Kalle,

great hint!

Anyhow, if we switch on our dev notebooks to 6.40, I will try again JProbe, now officially supported and - concerning the profiler - freeware!

(And I really like the call graph... ).

Best regards

Detlev

swapan_saha
Employee
Employee
0 Kudos

You can use Wily's Introscope for profiling J2EE apps even under load. The tool is little different than JVMPI based profiling tools (JProbe, OptimizeIt). In fact SAP Active Global Support will use it for all performance related support (memory leak, slow response time) for Netweaver stack. See the following link for reference.

http://www.wilytech.com/news/releases/041027.html

Thanks and regards,

Swapan

Former Member
0 Kudos

hello Kalle,

i tried to use YourKit Java Profiler on was 6.40 but am having great trouble. were you able to run it on 6.40?

when i add -Xrunyjpagent to the java parameter of the server node in ConfigTool, i can't get the server0 process to start. it is stuck in "waiting to start". once i remove that jvm param, engine starts fine.

is this a yjp agent port issue? according to their doc, the default port is 10000. i assume was j2ee engine is not using that port, since it seems to occupy ports starting at 50000 by default.

any clue is much appreciated.

Former Member
0 Kudos

Blowing the dust off this topic

A couple of questions:

For WAS 6.20 have any profiling tools been tested and if so any good advice how to get them running? I tried to get Optimizeit to run, but the go.bat on the server seems to be quite delicate to changes hence at least yet haven't had luck with starting the server with the required settings.

Now trying my luck with JProbe so shall see what the outcome is there.

For 6.40, what is the preferred profiling method? I understood that it comes with some sort of built in profiling capabilities, but maybe not as extensive as the Optimizeit or JProbe. Also it seems like JProbe has a plug-in for 6.30 so at least that configuration should be valid.

So for these two different versions of the WAS where should I look for a working profiling tool?

Cheers,

Kalle

detlev_beutner
Active Contributor
0 Kudos

Hi Kalle,

nice that this thread has got some attraction even if it is that old (hoping I will get the same attraction if I'm getting that old )

Ok, being serious:

For WAS 6.20 I both tried to run OptimizeIt, JProbe and one or two minor products. In short: No chance.

For 6.30/6.40, see and the links offered there. Outside EP, JProbe should work, but I didn't give it a try 'cause I'm still on EP6 SP2...

Hope it helps

Detlev

Former Member
0 Kudos

Hello Detlev,

here's another "info or hint": There is a document here in SDN that talks about starting JProbe with Web AS.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to start jprobe with web as java

Best regards

Peter Tillert

SAP NetWeaver Product Mgmt

detlev_beutner
Active Contributor
0 Kudos

Hello Peter,

thanks for that link (which, what a pity, is not to be found via the search engine, at least if one is looking for "JProbe").

About the sentence... "We hope to have a more convenient integration with JProbe and other profilers in future releases." - I do not think that these somehow "special" instructions are a real problem. Most people just will be glad to find this kind of support for a (and in this case: the most important) profiling tool. Sure, if the integration would get somehow more smooth, it would be nice. (But: Most integrations of JProbe with some special product need "hands on", that is something developers are used to.) Would be great to add this info on the Quest site, as stated above.

OK, so now I will have to wait some additional months for EP6 SP3 to be working on the new J2EE-Server... waiting... waiting... waiting...

Best regards

Detlev

Former Member
0 Kudos

Hi Detlev,

it looks very good that we will ship EP6 SP3 on Web AS 6.40 with NetWeaver 04 - which is planned for ramp-up end of March!

Cheers

Ivo

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Detlev,

walking down the hall into development I just got the information that you CAN use JProbe and that we do. There is even a note that should be readable in OSS for how to use JProbe with J2EE Engine.

To give you a slight impression how we work here, there are about 8000 people working in Walldorf alone, working in Java we have about fairly 1000 people worldwide (if that is enough). I think if there is any tool outside that makes those guys lives easier it has been checked.

We are even on the way to deliver tools that nobody ever has thought about in the Java market, because we're getting frequently 'hints' from the ABAP departments which deal with enterprise software since times when there was no Java available at all.

Regards,

Benny

detlev_beutner
Active Contributor
0 Kudos

Hey Benny,

thanks for you answer, but now there are more questions than before...

... I got JProbe to run in CPU-Profiling mode. That is great, but not enough. Trying to run the memory debugger resulted in a timeout starting servlet/jsp service (this is also the result for all OptimizeIt tools as for JProfiler when in the mode to collect memory allocation data). This is what Mario Kabadiyski stated about the well known memory profiling tools: "Für Memoryprofiling der Engine sind sie aufgrund fehlender Filterfunktionalität leider nicht geeignet, weil wie Sie selbst festgestellt haben, die enorme Eventlast aus der Engine die Tools einfach blokiert und somit zu kritischen Timeouts in der Statrtuphase führt." ("For memory profiling of the engine, unfortunately they are not suitable for reasons of missing filter functionality because, as you have determined by yourself, the enourmous event load produced by the engine just blocks the tools and so leads to critical timeouts in the startup phase.")

... In the service marketplace, there is no document or note to be found when searching for the term "JProbe". If the search engine just fails, it would be great to offer a link to the note, if it really exists.

... If a solution to this problem exists, it would be great to work together with Quest and to publish this solution on their site, because people may look for integration on the Quest site, and not finding such hints could leave a bad taste (and the general question, if profiling is possible with the SAP J2EE Engine; all others AppServers are listed and supported there - ATG Dynamo(!), BEA, Borland, IBM, Oracle, Sun et al - this also means all competitors in the portal market).

... "--- it has been checked" - would be great, but would even be greater if the public learns about the results in an easy way...

... "--- deliver tools that nobody ever has thought about in the Java market ---" Maybe I'm too sceptical about this, but as far as what I learned about these plans for example at TechEd, I've got the feeling that the other way round - let SAP / ABAP-developers learn from JAVA experiences in the big world - could be the better way (with some topics, sarcastically I think "tools that nobody ever wanted to think about in the Java market"). But that's another topic, first I would be glad if the minimums of Java development would be guaranteed before any never-thought-about-add-ons are presented.

Stay tuned,

best regards

Detlev

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Ok, lets see:

>In the service marketplace, there is no document or note to be found when searching for the >term "JProbe".

This is true. It was my fault because I translated "Hinweis" with an SAP Note. Actually the description is on an internal system. I check back if we can put it in a note. It's quite lengthy, so I cannot include it here.

> ... If a solution to this problem exists, it would be great to work together with Quest

For one thing, Detlev, you seem to assume that the product is out. It is not. Or let's say not in the sense of "general availability" how we call it. Such actions will appear once we are out.

>I've got the feeling that the other way round - let SAP / ABAP-developers learn from JAVA >experiences in the big world

Well, that means for example the Java Development Infrastructure, the Debugging system that supports cluster decoupling of single servers, and other things either in the labs or on the way out.

Regards,

Benny

detlev_beutner
Active Contributor
0 Kudos

Hello Benny,

> you seem to assume that the product is out

I think you think that I think about 6.30/6.40?!

For sure, also for these versions it would be important to be able to use these kind of tools.

But for these days, what's about 6.20 (definitely "out" and "generally available")?!

Best regards

Detlev

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Detlev,

got it. But 6.20 is SO far away for us, I'm most sure we won't do any efforts for it.

Despite this, I found out, we seem to have problems to get in contact with the right people at Quest. Do you have the right names there?

Regards and a happy new year,

Benny

detlev_beutner
Active Contributor
0 Kudos

Hello Benny,

a happy new year!

The main contact I had was Akin Akinrogunde, I do not have a direct mail address (but via support@quest.com). I had opened a case (nr. 216630), but this is closed now after passing the question to the product management. As I had stated above, since then I did not hear anything new.

Hope this helps

Detlev

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for this.

I'll check with them.

Regards,

Benny