Profiling Mendix using JProfiler

JProfiler is a Java profiler which can give you insight into what a running application is doing: which methods are consuming the most cpu, how many objects are created, etc. Jprofiler also shows you information about jdbc calls and sql statements executed by your java application.

Setting up Jprofiler to profile a Mendix runtime is easy, you can start profiling a running Mendix runtime, without reconfiguration or restarting the application.

The installation guide provides a more complete manual, but the basic steps are:

  1. download and install Jprofiler on a desktop, this will be the client gui
  2. download and unzip Jprofiler on your server, start bin/jpenable (see see section B.3.10 Attaching To JVM of the manual)
  3. Start the client on your desktop, connect to a remote server on the port indicated by jpenable

Here are some screenshots:

  • Choose to profile an application on a remote server

Profile remote app

  • My Mendix application is running in a virtual machine running Linux

Remote Linux

  • Choose which Java you are using

Choose JVM

  • I’ve already started the Mendix runtime

Start app immediately

  • IP Address of my virtual machine

Remote address

  • Directory in the virtual machine where i unzipped Jprofiler

Remote directory

  • This is the port returned by running bin/jpenable

Profiling port

  • Start

Start Jprofiler

  • Choose how you want Jprofiler to collect information about your application

Initial profiling settings

  • This is just default setup

Profiling setup

  • And finally where looking at some data collected by Jprofiler

Objects

  • I currently have 4 database connections

JDBC timeline

  • JDBC Hotspots shows the heaviest SQL statements

JDBC hotsports

blog comments powered by Disqus