Java profiling tools in Rational Application Developer (RAD) enables users to analyze execution flow, memory usage and thread usage. It can be very useful for tracking down performance problems in these areas. Java profiling is currently supported for applications running on local and remote WebSphere Application Servers, but only on local WebSphere Application Server Liberty profile. The ability to run Java profiling on remote WebSphere Application Server Liberty profile is now added in Rational Application Developer v9.5 Beta. Users can now run trace based profiling or sample based profiling on remote Liberty profile similar to the support on remote WebSphere Application Server.
As in the case of WebSphere Application Server, the Rational Agent Controller is required on the remote server where Liberty Profile is installed to enable remote profiling.
Prerequisites and required configurations
Before you begin profiling on a remote Liberty profile server, make sure you follow these information to configure your local system and remote systems:
-
Liberty Profile has been installed on both local and remote systems, configured and ready for application deployment
-
Setting up the Liberty profile server
On your remote system, ensure that you meet these prerequisites:
-
Have a Liberty profile server created. For information on creating Liberty profile server, see creating a Liberty profile server by using developer tools or creating a Liberty profile server manually
-
Configure server.xml for remote Liberty profile server. For more details, see Creating a remote Liberty profile server by using developer tools
-
Set the JAVA_HOME property for your remote Liberty profile server. The Liberty profile requires a JRE in which to run. You can specify the JDK or JRE location using the JAVA_HOME property in the server.env file. For example, if server.env doesn't exist in the <Liberty Install dir>\urs\servers\<servername> directory on your remote system, create one and add this line:
JAVA_HOME=<RAD install dir>\jdk\jre
-
Ensure that the server is started. The wlp/bin directory contains a script called server to help with controlling the server process.
Use the following command to start the server:
server start serverName
Use the following command to stop the server:
server stop serverName
On your local system, ensure that you meet these prerequisites:
-
Have Rational Application Developer v9.5 Beta installed.
-
Use Rational Application Developer to create and start a remote Liberty profile server. For more information, see Creating a remote Liberty profile server by using developer tools
-
Configure remote IBM® Rational Agent Controller in Rational Application Developer.
Go to Window > Preferences > Agent Controller > Integrated Agent Controller > select Disable > Apply > click Hosts > click Add > Add remote host name and Agent Controller port > click OK
-
Ensure that the IBM® Rational Agent Controller is started on the remote system.
You can download RAC V9.5 Beta from the same RAD V9.5 Beta site here. For more information about installing or starting Rational Agent Controller, see Installing Rational Agent Controller
Profiling on remote Liberty profile server
Here are the steps for profiling an application using remote Liberty profile server:
-
In the Enterprise Explorer view, right-click a resource that you want to profile on the server and select Profile As > Profile on server. The Profile on Server wizard opens.
-
Choose an existing server or manually define a new server. Click Next. The Add and Remove Project page opens.
-
Under the Configured Projects list, verify your application you want to profile is added. Click Finish.
-
If the server is already started in run or debug mode, you will be prompt to switch to profile mode. Select the Switch mode (will restart if necessary) radio button and click OK.
-
Another Profile on Server wizard opens with Profile Settings and Destination tabs. Use this wizard to specify your profiling criteria, such as selecting the relevant data collectors, analysis types, filters, and configuring the profiling data destination. Click Finish.
-
If you are in any perspective other than the Profiling perspective; the Confirm Perspective Switch dialog opens, click Yes to switch to the Profiling perspective.
-
In the Servers view, the server state now displays Profiling.
-
After the server starts in profiling mode, in the Profiling Monitor view, you can find the server process, process id and the corresponding profiler and analysis type.
In addition to traced-based profiling, sample-based profiling using Health Center agent is also supported on remote Liberty Profile. To profiling with Health Center agent on remote Liberty Profile server, on the Profile on Server wizard with Profile Settings and Destination tabs, you can:
Select Health Center Agent under Type of Profiling Analysis and click Finish.
Or click the Profiling Quick Start button to use the Profiling Quick Start wizard.
-
Select My application runs slower than expected
-
Select Sample-based profiling. Click Next.
-
Here is the Profiling Monitor view to show profiling sample data collected using Health Center Agent:
the above example shows which methods are using the most processing resources. Methods with a higher Self % value (those higher up near the top of the table) are good candidate for optimization to improve on execution time.
Rational Application Developer V9.5 Beta extends its Java profiling capability to support remote Libery Profile in addition to WebSphere Application Server full profile for both local and remote configurations. It offers developers and testers an exceptional developer experience having these tools fully integrated into the IDE, and enabling easy and quick identification of performance related issues through memory, thread and/or execution flow analysis during development and test.
For more information about the Java profiler, visit our Knowledge Center
-
To find out more about Rational Application Developer V9.5 Beta, visit our Early Program site
-
To join a discussion or ask questions about Rational Application Developer V9.5 Beta, visit our Beta Forum
-
To learn more about IBM Rational Application Developer, visit our product wiki