Skip to Content

Introduction:

While executing a Java application, the runtime objects created gets stored in one continuous memory region, which is called the heap.

Heap memory area exhibits the following behaviour

  • When an object is created, a portion of the heap is reserved.
  • When the heap fills up, those objects which are not in use are removed by the garbage collection
  • When the garbage collection runs is triggered, all the application requests goes to a halt stage.
  • Using JVM arguments the size of the heap can be altered
    • -Xmx<size> -> used to set the maximum Java heap size
    • -Xms<size> -> used to set the initial Java heap size

Thus it becomes very important to monitor, how your application consumes the memory in heap using JConsole.

Monitoring the Java heap using JConsole:

Prerequisite –

  • Configuring the heap memory of Lumira Server as shown below
    • Go to  http://<IP ADDRESS>:8080/BOE/CMC
    • Servers -> Servers List -> Right click on Lumira Server and select properties
    • Under “Command Line Parameters” check the heap memory parameters -Xms512m -Xmx10240m -XX:MaxMetaspaceSize=512m

 

  • In order to build a connection to JConsole, JMX port needs to be configured as shown below
    • Go to  http://<IP ADDRESS>:8080/BOE/CMC
    • Servers -> Servers List -> Right click on Lumira Server and select properties
    • Under “Command Line Parameters” add the following parameter                                       -Dcom.sun.management.jmxremote=true                                                                           -Dcom.sun.management.jmxremote.ssl=false                                                                   -Dcom.sun.management.jmxremote.port=6789                                                                 -Dcom.sun.management.jmxremote.authenticate=false

  Establishing Connection and Monitoring –

  • Execute “jconsole.exe” found under BOE installation folder  <Install Path>\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm_8\bin
  • Once the JConsole popup appears , select remote process -> localhost:6789                                   i.e. 6789 is the port number that was enabled in the command line parameter.

Note: Remote monitoring is also possible. Jconsole can be triggered in different machine and can be connected to the target machine “using the IP address(instead of using localhost)”

  • Now a monitoring screen appears having the following
    1. Four monitoring tabs are available i.e. Memory / Threads / %CPU Utilisation / Number of classes.
    2. The below monitoring screen shows an example on “How the server responds” , when the load on the application is applied and when load is not applied.
      • It can be observed that the memory reached ~6Gb(when the load is high) and gradually reduced (When the load is reduced).
      • Which implies that the memory allocated as max heap is sufficient for the load to run. i.e. ~6GB(Currently used m/m consumption) out of 10Gb (max heap defined memory -Xmx) was used. 

 

Thus Jconsole can be used to monitor , how the JAVA based application is behaving with load.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply