Skip to Content

How to setup YourKit Java Profiler for to trace CPU and Memory usage in SUP 2.x


How to setup YourKit Java Profiler to trace CPU and
Memory usage for SUP 2.x


This technical document explains how to setup yourKit and monitor SUP.YourKit is an excellent
way to drill down inside the Java JVM Java  to capture Garbage collection,CPU and memory statistics.

YourKit is a tool for profiling Java & .NET applications.It can collect memory, CPU threading as well as JVM
garbage collections. This is a useful tool to drill further down in to the Java processes to help identify blocking
and performance issues. You can monitor threading processes as well as TSQL statements. 

Required Software

1.            SUP 2.x.x or higher.

2.            YourKit Java Profiler 2013 Release.

3.            Read Write Permissions.


  • This document assumes you have a working SUP environment.
  • You have downloaded the YourKit from 
  • Have Administrator rights to the Operating System and Sybase Unwired Server.

Issue1: High CPU utilization and high memory usage.

  • User needs to debug high CPU usage.
  • User needs to investigate high memory usage.
  • User needs to investigate SUP hanging.
  • User needs to monitor threading processes.


You need to configure Your Kit java profiler.

1. Download YourKit from 

2. Get a  YourKit evaluation license.

3. Install yourKit.

4. Add C:\Program Files (x86)\YourKit Java Profiler 12.0.6\bin\win64;


Figure 1

4. Stop the SUP server from the Windows Services.

5. Backup \Sybase\UnwiredPlatform\Servers\UnwiredServer\bin\mlsrv.ext.ini
6. Edit \Sybase\UnwiredPlatform\Servers\UnwiredServer\bin\mlsrv.ext.ini
Add -agentlib:yjpagent  before -cpin mlsrv.ext.ini See Figure 2.

Figure 2

Example: java (-jrepath"C:\SAP\MobilePlatform\JDK1.6.0_31-x64\jre" -agentlib:yjpagent -cp

8. Restart the SUP server via the Windows services.

This completes the configuration of the YourKit and the SUP Server. At this point the SUP server should
be up and running. In the next steps I will show you how to start collecting the performance for the CPU,
Memory and Garbage collecting.  

Step 1: Collecting performance data with YourKit.

User needs to monitor and collect CPU, Memory and Garbage collecting information.


In order to do that, you need to have access to the YourKit as an Administrator.

1.   Open YourKit via the desktop icon.

2.   You should see in the list of application ini.

Figure 3

3. To start collecting double click on the ini.

4. On the menu you will have several option to view. CPU threading as well as memory.

5. Here is a running dialog menu item showing the CPU performance and what is taking place.

Figure 4

6. And here for the same CPU process showing the threads that are active.

Figure 5

7. In the following screen you can see the additional option to create snapshots for memory.

   You can perform snapshots for CPU as well as threading.

The default location for snapshots is saved C:\User\userprofile\Snapshots.
YourKit saves the data with a .snapshot format so you would need the YourKit in order to read the files.


Figure 7

This completes the collection phase using the YourKit At this point you should have several collection files
under your user profiles with the extension .snapshot. In the next section I will show you how to load the files
and run the analyzer to extract the information you have collect.

Step 2: Reading and analyzing the data that was collected.

1. First go to file open Snapshot.

Figure 8

2. Point to you use home directory and select one of the snap shot files.

Figure 9

Once the file is loaded you can select each option to view such as CPU usage.
See Figure 4 and the tab for each option.

Figure 10

Figure 11

Note in Figure 12 the message not closed files and Socket connection this is from a test connects from the SAP
Control Center. There was no work done except a test connect so this is expected.

Figure 12

Here are the side by side screen you will see for the memory pool and usage.This is great way to compare memory usage.

Figure 13

If you wish to go even deeper in to the YouKit file there is an option to analyze the file.

Select the Inspection tab and then select run All Inspections. This will further analyze the file and provide more details.

Figure 14


This document explained in details about the steps needed to set up the MyKitand capture the processing threads CPU,
Memory usage as well as Garbage collecting. As with any utility you use there is over head and it is not a good idea to
leave the YourKit running over days or weeks.It is how ever a good tool to use to grab a snap shot of the SMP server at
intervals of five, ten minutes at a time.You will have many other options that are available such as looking at the SQL statement
that are being executed from the menus and output file.

No comments