update
This commit is contained in:
parent
5b2c70eb54
commit
74217cdffe
@ -1,4 +1,4 @@
|
|||||||
MC_DIR=/root/mc/renyuan/Server # 活动目录(主机上的路径)
|
MC_DIR=/root/mc/renyuan/Server # 活动目录(主机上的路径)
|
||||||
JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径
|
JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径
|
||||||
MAX_MEMORY=7G
|
MAX_MEMORY=5G
|
||||||
MIN_MEMORY=7G
|
MIN_MEMORY=5G
|
@ -4,13 +4,13 @@ services:
|
|||||||
container_name: minecraft-server
|
container_name: minecraft-server
|
||||||
working_dir: /mc-server
|
working_dir: /mc-server
|
||||||
environment:
|
environment:
|
||||||
- MAX_MEMORY=7G # 设置最大内存为 10GB
|
- MAX_MEMORY=5G # 设置最大内存为 10GB
|
||||||
- MIN_MEMORY=7G # 将最小内存也设置为 10GB,确保不会低于该值
|
- MIN_MEMORY=5G # 将最小内存也设置为 10GB,确保不会低于该值
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
volumes:
|
volumes:
|
||||||
- ${MC_DIR}:/mc-server
|
- ${MC_DIR}:/mc-server
|
||||||
command: >
|
command: >
|
||||||
java -Xms${MIN_MEMORY} -Xmx${MAX_MEMORY} -XX:MaxRAM=8G
|
java -Xms${MIN_MEMORY} -Xmx${MAX_MEMORY} -XX:MaxRAM=5G
|
||||||
-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m
|
-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m
|
||||||
-XX:MaxDirectMemorySize=2G
|
-XX:MaxDirectMemorySize=2G
|
||||||
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200
|
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200
|
||||||
|
Loading…
Reference in New Issue
Block a user