From 74217cdffead8767499d6b3f27f42ded1d4a14f3 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sun, 29 Dec 2024 13:07:56 +0800 Subject: [PATCH] update --- rxr_mc/.env | 4 ++-- rxr_mc/docker-compose.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rxr_mc/.env b/rxr_mc/.env index 3a183c9..60729d4 100644 --- a/rxr_mc/.env +++ b/rxr_mc/.env @@ -1,4 +1,4 @@ MC_DIR=/root/mc/renyuan/Server # 活动目录(主机上的路径) JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径 -MAX_MEMORY=7G -MIN_MEMORY=7G \ No newline at end of file +MAX_MEMORY=5G +MIN_MEMORY=5G \ No newline at end of file diff --git a/rxr_mc/docker-compose.yaml b/rxr_mc/docker-compose.yaml index 8b093ea..79dccee 100644 --- a/rxr_mc/docker-compose.yaml +++ b/rxr_mc/docker-compose.yaml @@ -4,13 +4,13 @@ services: container_name: minecraft-server working_dir: /mc-server environment: - - MAX_MEMORY=7G # 设置最大内存为 10GB - - MIN_MEMORY=7G # 将最小内存也设置为 10GB,确保不会低于该值 + - MAX_MEMORY=5G # 设置最大内存为 10GB + - MIN_MEMORY=5G # 将最小内存也设置为 10GB,确保不会低于该值 - TZ=Asia/Shanghai volumes: - ${MC_DIR}:/mc-server 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:MaxDirectMemorySize=2G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200