Jump to content

Recommended Posts

Posted (edited)

Description

This is not something new, this tool has been used for several years and yet when I ask for a JFR file, many people do not know what it is. The purpose of this topic is to guide you on the correct way for L2J server administrators or developers to find server performance issues through the JMC software. You can improve stability and performance by finding and fixing memory leaks, CPU overloads, deadlocks; garbage collection performance, synchronization performance, I/O performance, and code execution performance. For example, you can record the Game Server when your players are at Baium; mass PvP-ing.

Requirements

Oracle JDK 11 and later.

JDK Mission Control (JMC)

1.png


JDK Mission Control (JMC) is a production-time profiling and diagnostics tool. It includes tools to monitor and manage your Java application with very small performance overhead.

Java Management console (JMX) connects to a running JVM and collects and displays key characteristics in real time. It is a tool for monitoring and managing a running JVM instance. The tool presents live data about memory and CPU usage, garbage collections, thread activity, and so on. It also includes a fully featured JMX MBean browser that you can use to monitor and manage MBeans in the JVM and in your Java application.

Flight Recorder (JFR) is a profiling and event collection framework built into the JDK. Flight Recorder allows Java administrators and developers to gather detailed low-level information about how a JVM and Java applications are behaving. You can use JMC, with a plug-in, to visualize the data collected by JFR. Flight Recorder and JMC together create a complete toolchain to continuously collect low-level and detailed runtime information enabling after-the-fact incident analysis.

How-To Do A Flight Record

Windows

2.png


If your server is running on Windows, you can use JDK Mission Control (JMC) directly on your VPS/dedicated server for real-time monitoring or recording.

Linux

The best way is to capture a java process (like Game Server) using its ID:
 

jcmd 21089 JFR.start duration=1800s filename=baium_fight.jfr


21089 is the process ID. You can list your processes by filtering them with the keyword "java".
 

ps aux | grep java


Output example:
 

centos   21089  1.7 31.4 9032320 2454828 ?     Sl   03:48  16:36 java -server -Dfile.encoding=UTF-8 -Xmx16G -cp config:./* gold.lineage2.GameServer
centos   26017  0.0  0.0 112812   980 pts/2    S+   19:28   0:00 grep --color=auto java
root     29448  0.5  1.9 3024556 155820 ?      Sl    2022 239:19 java -server -Dfile.encoding=UTF-8 -Xmx256m -cp config:./* gold.lineage2.LoginServer


And open the JFR file via the JDK Mission Control (JMC) software on your Windows machine, or send it to your developer.

Download

 

https://www.oracle.com/java/technologies/javase/products-jmc8-downloads.html

 

Bottom Line

 

I don't think it's necessary to tell you how to navigate through this software. It is very simple. It can even generate a summary with suggestions.


Resources:

JDK Mission Control User Guide

Edited by Trance
  • Like 6
  • Thanks 3
  • Upvote 2
  • Trance changed the title to L2J Stability & Performance Monitoring by using JMC
  • Trance changed the title to JDK Mission Control - Performance-Analysis Tool

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...