5 ms·
Minecraft servers are resource hogs even when idle. Enable the built-in idle server shutdown (IDLE_SERVER=true). It automatically stops the server after a few
by harrigan 2mo ago
Minecraft servers are resource hogs even when idle. Enable the built-in idle server shutdown (IDLE_SERVER=true). It automatically stops the server after a few minutes with no players and starts it again when needed. It's not enabled by default.
- ChoosesBarbecue 2mo agoI'm struggling to find documentation on `IDLE_SERVER`, do you know of any? The only place I see it documented is on ArchWiki [0], but I don't know if that is an Arch distribution specific feature. I do see `pause-when-empty-seconds` [1] when looking at the wiki, which seems the closest, although I can't find doc on what "paused" means (this is the closest [2]). Looks like a fairly new feature (2024), but it's neat they've thought about it. [0]: https://wiki.archlinux.org/title/Minecraft/Java_Edition_server#Tweaking https://wiki.archlinux.org/title/Minecraft/Java_Edition_serv... [1]: https://minecraft.wiki/w/Server.properties https://minecraft.wiki/w/Server.properties [2]: https://www.reddit.com/r/admincraft/comments/1k330eg/what_happens_when_a_server_pauses/mnz9sri/ https://www.reddit.com/r/admincraft/comments/1k330eg/what_ha...
- syrrim 2mo ago> I don't know if that is an Arch distribution specific feature. That's unlikely for two reasons, first because minecraft is closed source, and second because arch packages usually follow upstream very closely.
- ChoosesBarbecue 2mo agoBased on my read of the `minecraft-server` package [0], I think it is using a management script wrapper around the raw Minecraft JAR [1], which implements the aforementioned idle functionality [2]. [0]: https://aur.archlinux.org/cgit/aur.git/about/?h=minecraft-server https://aur.archlinux.org/cgit/aur.git/about/?h=minecraft-se... [1]: https://github.com/Edenhofer/minecraft-server https://github.com/Edenhofer/minecraft-server [2]: https://github.com/Edenhofer/minecraft-server/blob/421ff0ff3302f746dcad95b0c90c22c4f904a286/minecraftd.sh.in#L108-L165 https://github.com/Edenhofer/minecraft-server/blob/421ff0ff3...
- syrrim 2mo agothat's not arch specific per se but touche
- harrigan 2mo agoYou might be right: I am indeed using https://aur.archlinux.org/packages/minecraft-server https://aur.archlinux.org/packages/minecraft-server. I thought IDLE_SERVER was an upstream feature but it seems to part of that package's management script.