React
Search…
Memory Profiling
Profile plugin memory usage estimates.

Profiling Plugin Memory

Due to the way java is, memory profiling can be quite tricky. Especially because of how inaccurate it can be due to GC. However, react has the ability to utilize classmexer which takes advantage of java instrumentation and java agents. This guide will assist you in setting up react to utilize the class mexer.
Please keep in mind that these are heavy estimates. If one plugin reports high memory, continue to check it every so often. There is no perfect way to determine the exact amount of memory a plugin is using.

System Requirements

  • The server must have internet access for setup only
  • Edit access to the start script / command for your server (i.e. java -Xmx -Xms -jar)
  • React 6.548+

Install the Agent

To install the classmexer agent, simply run the following command either ingame or in your console
1
/react installagent
Copied!
You should see the following output
1
> react installagent
2
[React]: Downloading Volume Memory Agent.
3
[React]: Downloading: 11%
4
[React]: Downloading: 22%
5
[React]: Downloading: 34%
6
[React]: Downloading: 45%
7
[React]: Downloading: 56%
8
[React]: Downloading: 67%
9
[React]: Downloading: 78%
10
[React]: Downloading: 89%
11
[React]: Downloading: 100%
12
[React]: Download Complete!
Copied!
Once the agent has been downloaded, you will notice a jar file named "classmexer.jar" in the root directory of your server (whereever your server jar is)

Configure your Launch Arguments

Since we are utilizing a javaagent, you must specify it during startup. This is very simple. For example, if you have the following launch command
1
java -Xmx2g -Xms1m -XX:+UseG1GC -jar spigot-1.12.2.jar
Copied!
You will need to specify the javaagent just before -jar xxx
1
java -Xmx2g -Xms1m -XX:+UseG1GC -javaagent:classmexer.jar -jar spigot.jar
Copied!

Profiling Plugin Usage

Now that you have setup the classmexer, you can now use react to see ESTIMATES on memory.
You can specify on a per plugin basis like so
1
> react memory Essentials
2
[React]: Essentials is using ~27.96 MB of memory.
Copied!
You can also get the top use from all plugins like so
1
> react memory top
2
[React]: Computing Memory usage for 13 plugins
3
[React]: Computing Sizes: 8%
4
[React]: Computing Sizes: 38%
5
[React]: Computing Sizes: 69%
6
[React]: Computing Sizes: 100%
7
FastAsyncWorldEdit: 86.93 MB
8
DirePluigin: 85.24 MB
9
VolumedPlugin: 84.62 MB
10
PlaceholderAPI: 84.55 MB
11
Vault: 79.17 MB
12
BileTools: 79.10 MB
13
Fulcrum: 70.32 MB
14
Multiverse-Core: 70.00 MB
15
ProtocolLib: 69.99 MB
16
Essentials: 64.75 MB
17
WorldEdit: 64.65 MB
18
React: 59.30 MB
19
Wormholes: 57.36 MB
Copied!
Using /re mem top (/react memory top) can sometimes freeze if something unexpected happens when profiling. Use /re mem <plugin> instead.
Last modified 10mo ago