mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-05-19 10:25:25 +00:00
docs: document JMX_PORT (#2489)
This commit is contained in:
@@ -62,12 +62,31 @@ you can use
|
|||||||
|
|
||||||
## Enable Remote JMX for Profiling
|
## Enable Remote JMX for Profiling
|
||||||
|
|
||||||
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true`, set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
|
To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
|
||||||
|
|
||||||
|
!!! example
|
||||||
|
|
||||||
|
With `docker run`
|
||||||
|
|
||||||
```
|
```
|
||||||
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
|
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port.
|
||||||
|
|
||||||
|
!!! example
|
||||||
|
|
||||||
|
With a compose file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
ENABLE_JMX: true
|
||||||
|
JMX_HOST: ${HOSTNAME}
|
||||||
|
JMX_PORT: "7092"
|
||||||
|
ports:
|
||||||
|
- "7092:7092"
|
||||||
|
```
|
||||||
|
|
||||||
## Enable Aikar's Flags
|
## Enable Aikar's Flags
|
||||||
|
|
||||||
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
|
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
|
||||||
|
|||||||
Reference in New Issue
Block a user