- Yourkit Agent
- Yourkit Java Profiler Review
- Yourkit Java Profiler Download
- Yourkit Java Profiler Example
- Yourkit Java Profiler 2020.9
How to setup YourKit Java Profiler to trace CPU and
Memory usage for SUP 2.x
JProfiler shows more accurate and concise information for performance analysis with the exact number of method invocations and percent time spent in each method. I have yet to find this in yourkit. It seems yourkit just gives sampling information which is not accurate. 2) YourKit Java Profiler. YourKit is also a widely used profiler for Java applications. It is a cross-platform tool that supports different operating systems such as Linux, Windows, Mac OS, Solaris, FreeBSD, etc. Like the JProfile, it also provides several features to visualize threads, garbage collection, memory leaks, memory usage. In closing, YourKit Java Profiler is an advanced and useful software solution which aims to assist developers in running CPU and memory profiling tasks on Java-based tools, providing you with the.
Purpose
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.
DESCRIPTION
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.
Assumption
- This document assumes you have a working SUP environment.
- You have downloaded the YourKit from http://www.yourkit.com/
- 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.
Solution
You need to configure Your Kit java profiler.
1. Download YourKit from http://www.yourkit.com/
2. Get a YourKit evaluation license.
3. Install yourKit.
4. Add C:Program Files (x86)YourKit Java Profiler 12.0.6binwin64;
Figure 1
4. Stop the SUP server from the Windows Services.
5. Backup SybaseUnwiredPlatformServersUnwiredServerbinmlsrv.ext.ini
6. Edit SybaseUnwiredPlatformServersUnwiredServerbinmlsrv.ext.ini
7.Add-agentlib:yjpagentbefore -cpin mlsrv.ext.ini See Figure 2.
Figure 2
Example: java (-jrepath'C:SAPMobilePlatformJDK1.6.0_31-x64jre' -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.
Solution
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:UseruserprofileSnapshots.
YourKit saves the data with a .snapshot format so you would need the YourKit in order to read the files.
Figure 6
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
Yourkit Agent
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
Summary
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.
Yourkit Java Profiler Review
Join the DZone community and get the full member experience.
Join For FreeYourkit Java Profiler Download
It can be downloaded at http://www.yourkit.com/download/
MOST NOTABLE CHANGES AND NEW FEATURES:
NEW FEATURE: ATTACH MODE:
- Ability to profile Java applications started without the profiler agent
MEMORY PROFILING:
- Choose in UI objects of which reachability scope (strong/weak/soft/finalizer) to analyse
- New inspection 'Objects with biggest distance to nearest GC root'
helps finding longest chains of objects such as linked lists, queues, trees etc.
- New inspection 'HashMap hash code distribution'
helps finding maps with bad performance due to hash collisions
- New inspection 'Duplicate Arrays' finds potential memory waste
- Ability to capture HPROF snapshots for JRockit R28.0.0 and newer
- HPROF snapshots: thread stacks at the moment of snapshot capture are shown in 'Threads' tab
- HPROF snapshots: compressed pointer mode supported (-XX:+UseCompressedOops)
- HPROF snapshots: more accurate size calculation for some arrays
- First elements of primitive arrays are immediately shown in object explorers
- Default number of array elements shown in object explorer can be configured
- New action 'Memory | Class Itself (java.lang.Class) by Name...' (Ctrl+Shift+C)
- Improved Garbage collection view
- Allocation views UI cleanup
- Quick info shows text presentation for char[] and java.lang.String in scrollable text area.
In particular, this allows to inspect long strings.
- Quick info allows to export entire string or primitive array to a file
- Quick info: text presentation is shown initially positioned at beginning of the text.
Also, long lines are wrapped.
CPU PROFILING:
- UI improvements
TELEMETRY:
- Threads view optionally shows all threads, only live threads or only finished threads
- UI improvements and bug fixes
PROBES:
- New built-in probe to monitors processes launched via Runtime.exec() and ProcessBuilder
- Improved performance and reduced garbage collector load
- Startup option 'noprobe' allows not to register particular built-in probe on startup
IDE INTEGRATION:
- Eclipse: Maven run configuration type supported
- NetBeans: Maven projects supported
- IntelliJ IDEA X (EAP) supported
- Eclipse: optional flat UI for the plugin settings
- Eclipse: ability to install the profiler plugin with limited internet access
USER INTERFACE:
- To save vertical space for other components, the help bar height was reduced.
Also, there is an option to hide the help bar and/or the status bar.
- 'Thread name' filter in 'Threads' tab (and similar filters in other views)
now optionally accepts full regular expression syntax
MISCELLANEOUS:
- Automatic deadlock detector now also supports ownable synchronizers
(java.util.concurrent.locks.*)
- Command line tool to control profiling: new commands clear-cpu-data, clear-alloc-data,
clear-monitor-data
- Solaris: profiler UI startup script yjp.sh automatically uses JDK 6 in standard location;
this means that on most machines it will run out of the box
- Offline Help is available
See complete list of changes at http://www.yourkit.com/changes/
Sincerely,
YourKit Team
Yourkit Java Profiler Example
Opinions expressed by DZone contributors are their own.
Yourkit Java Profiler 2020.9
Popular on DZone
