Trance Posted January 25, 2023 Posted January 25, 2023 (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) 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 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 January 28, 2023 by Trance 6 3 2
Celestine Posted January 26, 2023 Posted January 26, 2023 This guide is truly amazing and it is clear that the community greatly benefits from having resources like this available. thanks @Trance
InTheEndॐ Posted January 26, 2023 Posted January 26, 2023 Trance always shares something amazing. Good job here,I didn’t knew something like this existed.
Vision Posted January 27, 2023 Posted January 27, 2023 Good job @Trance It could be helpful for many of us.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now