Compare commits
4
Commits
49af536786
...
v0.5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a8db34b69 | ||
|
|
28b3510c10 | ||
|
|
68f090061f | ||
|
|
be08756c36 |
No files matched your search
@@ -39,7 +39,7 @@ podman run -d --name zomboidforge \
|
|||||||
Unset variables keep the value in the server `.ini` (or the game default).
|
Unset variables keep the value in the server `.ini` (or the game default).
|
||||||
|
|
||||||
| Variable | Default | |
|
| Variable | Default | |
|
||||||
|-------------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `SERVER_NAME` | `zomboidforge` | Server config name (`/data/Server/<name>.ini`) |
|
| `SERVER_NAME` | `zomboidforge` | Server config name (`/data/Server/<name>.ini`) |
|
||||||
| `SERVER_PASSWORD` | | Password clients need to join (`.ini` `Password`) |
|
| `SERVER_PASSWORD` | | Password clients need to join (`.ini` `Password`) |
|
||||||
| `PUBLIC` | | `true`/`false`: listed in the in-game server browser |
|
| `PUBLIC` | | `true`/`false`: listed in the in-game server browser |
|
||||||
@@ -56,6 +56,7 @@ Unset variables keep the value in the server `.ini` (or the game default).
|
|||||||
| `JVM_MIN_HEAP` | JVM default | `-Xms`; unused heap memory is returned to the system only down to this size |
|
| `JVM_MIN_HEAP` | JVM default | `-Xms`; unused heap memory is returned to the system only down to this size |
|
||||||
| `JVM_MAX_HEAP` | 75 % of the memory limit | `-Xmx`; `8g` when the container has no memory limit |
|
| `JVM_MAX_HEAP` | 75 % of the memory limit | `-Xmx`; `8g` when the container has no memory limit |
|
||||||
| `JVM_UNCOMMIT_DELAY` | `60` | Seconds after which unused heap memory is returned to the system (`-XX:ZUncommitDelay`) |
|
| `JVM_UNCOMMIT_DELAY` | `60` | Seconds after which unused heap memory is returned to the system (`-XX:ZUncommitDelay`) |
|
||||||
|
| `JVM_EXPERIMENTAL_PERFORMANCE` | `false` | `true`/`false`: `-XX:+UseCompactObjectHeaders` and `-XX:+UseTransparentHugePages` (see below) |
|
||||||
| `STEAM` | `1` | `0` runs the server without Steam |
|
| `STEAM` | `1` | `0` runs the server without Steam |
|
||||||
| `SOFT_RESET` | | `true` starts once in soft reset mode (`-Dsoftreset`); unset it afterwards |
|
| `SOFT_RESET` | | `true` starts once in soft reset mode (`-Dsoftreset`); unset it afterwards |
|
||||||
| `ZF_EXPERIMENTAL_PERFORMANCE` | `false` | `true`/`false`: performance changes that alter timing or resource use (more threads, shorter waits); overrides `forge.toml` |
|
| `ZF_EXPERIMENTAL_PERFORMANCE` | `false` | `true`/`false`: performance changes that alter timing or resource use (more threads, shorter waits); overrides `forge.toml` |
|
||||||
@@ -76,6 +77,9 @@ Notes:
|
|||||||
rest stays for native memory. The startup briefly needs a large heap; with 8 players
|
rest stays for native memory. The startup briefly needs a large heap; with 8 players
|
||||||
exploring, the heap held up to 4.4 GB of live data in tests. A limit below about 6 GB is
|
exploring, the heap held up to 4.4 GB of live data in tests. A limit below about 6 GB is
|
||||||
not recommended. Without a limit the heap is `8g`, as in vanilla.
|
not recommended. Without a limit the heap is `8g`, as in vanilla.
|
||||||
|
- **Huge pages:** `JVM_EXPERIMENTAL_PERFORMANCE=true` maps the heap with transparent huge pages
|
||||||
|
only when the host's `/sys/kernel/mm/transparent_hugepage/shmem_enabled` is `advise` or
|
||||||
|
`always` (a container cannot change it); otherwise the JVM logs a warning and runs without them.
|
||||||
- **Stopping:** `SIGTERM` triggers the game's own save-and-quit. Allow enough time for large worlds.
|
- **Stopping:** `SIGTERM` triggers the game's own save-and-quit. Allow enough time for large worlds.
|
||||||
|
|
||||||
For local testing use `compose.yaml` (`podman compose up --build`, settings from `.env`).
|
For local testing use `compose.yaml` (`podman compose up --build`, settings from `.env`).
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ services:
|
|||||||
JVM_MIN_HEAP: ${JVM_MIN_HEAP:-}
|
JVM_MIN_HEAP: ${JVM_MIN_HEAP:-}
|
||||||
JVM_MAX_HEAP: ${JVM_MAX_HEAP:-}
|
JVM_MAX_HEAP: ${JVM_MAX_HEAP:-}
|
||||||
JVM_UNCOMMIT_DELAY: ${JVM_UNCOMMIT_DELAY:-}
|
JVM_UNCOMMIT_DELAY: ${JVM_UNCOMMIT_DELAY:-}
|
||||||
|
JVM_EXPERIMENTAL_PERFORMANCE: ${JVM_EXPERIMENTAL_PERFORMANCE:-}
|
||||||
ZF_EXPERIMENTAL_PERFORMANCE: ${ZF_EXPERIMENTAL_PERFORMANCE:-}
|
ZF_EXPERIMENTAL_PERFORMANCE: ${ZF_EXPERIMENTAL_PERFORMANCE:-}
|
||||||
ports:
|
ports:
|
||||||
# Host and container ports must be equal: the server reports its own port
|
# Host and container ports must be equal: the server reports its own port
|
||||||
|
|||||||
@@ -32,8 +32,9 @@ public final class ThreadMod extends Mod
|
|||||||
public void onServerStarted()
|
public void onServerStarted()
|
||||||
{
|
{
|
||||||
this.modThread().execute(() -> {
|
this.modThread().execute(() -> {
|
||||||
this.log.add("work on " + Thread.currentThread().getName());
|
// Hand-off before the log entry: tests that see the entry know the task is queued.
|
||||||
this.main().execute(() -> this.log.add("result on " + Thread.currentThread().getName()));
|
this.main().execute(() -> this.log.add("result on " + Thread.currentThread().getName()));
|
||||||
|
this.log.add("work on " + Thread.currentThread().getName());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,12 @@
|
|||||||
# JVM_UNCOMMIT_DELAY
|
# JVM_UNCOMMIT_DELAY
|
||||||
# Seconds of disuse after which ZGC returns heap memory to the system
|
# Seconds of disuse after which ZGC returns heap memory to the system
|
||||||
# (-XX:ZUncommitDelay). Default: 60 (JVM default: 300)
|
# (-XX:ZUncommitDelay). Default: 60 (JVM default: 300)
|
||||||
|
# JVM_EXPERIMENTAL_PERFORMANCE
|
||||||
|
# true/false: compact object headers (-XX:+UseCompactObjectHeaders) and
|
||||||
|
# transparent huge pages for the heap (-XX:+UseTransparentHugePages).
|
||||||
|
# Huge pages need the host's
|
||||||
|
# /sys/kernel/mm/transparent_hugepage/shmem_enabled at advise or always;
|
||||||
|
# otherwise the JVM logs a warning and runs without them. Default: false
|
||||||
#
|
#
|
||||||
# Maintenance
|
# Maintenance
|
||||||
# SOFT_RESET true: start in Project Zomboid's soft reset mode (-Dsoftreset).
|
# SOFT_RESET true: start in Project Zomboid's soft reset mode (-Dsoftreset).
|
||||||
@@ -83,6 +89,7 @@ readonly RCON_PASSWORD="${RCON_PASSWORD:-}"
|
|||||||
readonly JVM_MIN_HEAP="${JVM_MIN_HEAP:-}"
|
readonly JVM_MIN_HEAP="${JVM_MIN_HEAP:-}"
|
||||||
readonly JVM_MAX_HEAP="${JVM_MAX_HEAP:-}"
|
readonly JVM_MAX_HEAP="${JVM_MAX_HEAP:-}"
|
||||||
readonly JVM_UNCOMMIT_DELAY="${JVM_UNCOMMIT_DELAY:-60}"
|
readonly JVM_UNCOMMIT_DELAY="${JVM_UNCOMMIT_DELAY:-60}"
|
||||||
|
readonly JVM_EXPERIMENTAL_PERFORMANCE="${JVM_EXPERIMENTAL_PERFORMANCE:-}"
|
||||||
readonly SOFT_RESET="${SOFT_RESET:-}"
|
readonly SOFT_RESET="${SOFT_RESET:-}"
|
||||||
|
|
||||||
readonly SERVER_INI="${DATA_DIR}/Server/${SERVER_NAME}.ini"
|
readonly SERVER_INI="${DATA_DIR}/Server/${SERVER_NAME}.ini"
|
||||||
@@ -336,6 +343,13 @@ build_jvm_args() {
|
|||||||
if [[ -n "${JVM_MIN_HEAP}" ]]; then
|
if [[ -n "${JVM_MIN_HEAP}" ]]; then
|
||||||
jvm_args+=("-Xms${JVM_MIN_HEAP}")
|
jvm_args+=("-Xms${JVM_MIN_HEAP}")
|
||||||
fi
|
fi
|
||||||
|
if [[ -n "${JVM_EXPERIMENTAL_PERFORMANCE}" ]]; then
|
||||||
|
if is_true "${JVM_EXPERIMENTAL_PERFORMANCE}"; then
|
||||||
|
jvm_args+=("-XX:+UseCompactObjectHeaders" "-XX:+UseTransparentHugePages")
|
||||||
|
elif ! is_false "${JVM_EXPERIMENTAL_PERFORMANCE}"; then
|
||||||
|
fail "JVM_EXPERIMENTAL_PERFORMANCE must be true or false, got '${JVM_EXPERIMENTAL_PERFORMANCE}'."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [[ -n "${SOFT_RESET}" ]] && is_true "${SOFT_RESET}"; then
|
if [[ -n "${SOFT_RESET}" ]] && is_true "${SOFT_RESET}"; then
|
||||||
log "SOFT_RESET is set: starting in soft reset mode. Unset it for the next start."
|
log "SOFT_RESET is set: starting in soft reset mode. Unset it for the next start."
|
||||||
jvm_args+=("-Dsoftreset")
|
jvm_args+=("-Dsoftreset")
|
||||||
|
|||||||
Reference in new issue
Block a user