Gregtech++ [GT++] [GTplusplus]

Gregtech++ [GT++] [GTplusplus]

94.1k Downloads

Request: Add option to adjust game save interval for servers [GTNH Pack 2.0.9.0]

Godelboard opened this issue · 4 comments

commented

Posting issue/request that was discussed in GTNH Discord between myself, Lucy, Kekz, and Alk.

Current Behavior

Every 45 seconds, the Minecraft server does an auto-save which freezes the sever, sometimes losing 100+ ticks, to save. This is in spite of having an SSD and only a few MB being saved every 45 seconds.
image
Image1: First 1 spikes of disk I/O triggered by standard server auto-save. After 3rd spike I disabled auto-save. 4th spike was caused by manual calls to save-all.
image

Expected Behavior

Saves not to freeze the server for so long, or have more granular controls over how saving occurs.

Possible Solution

Since tracking down the mods who have unoptimized save procedures would be very time consuming (unless it's like one mod...), I propose a config option which can adjust the frequency at which the Minecraft Server does autosaves.

My current manual workaround is to have save-off while I'm actively playing and remember to manually tell the server to save-all every now and then. This isn't my favorite option due to the risk of losing progress if I forget to save and something happens to the server, but it's a risk worth taking to experience smoother gameplay.

Steps to Reproduce (for bugs)

Easiest way to see this to watch a tick monitoring mod like OPIS while players are logged in to the server.
The server pause/saves can be seen in the update time graph every 45-50 seconds. These spikes can be manually triggered by issuing the save-all command to the server. These spikes go away entirely if the save-off command is issued to the server.

Context

The server freezing for 1-5 seconds every 45 seconds is a very jarring experience and makes for less enjoyable game play for myself and my friends.

GTNH Discord Moderator Lucy 🌷#2501 chimed in and commented that this plagues their server as well.

Game Environment

  • Modpack Name: GTNH

  • Version used: 2.0.9.0

  • Download Link if possible:

  • Additional Mods added: Antique Atlas, FTB Utilities

  • Gregtech version: 5.09.33.52

  • IC2 version: 2-2.2.828a-experimental

  • Java version: 8.0.51.16 Hotspot. Also tried OpenJ9 with no improvements.

  • Operating System: W7 64bit

Misc Info

Check all that apply ([ ] -> [x] - use a lowercase x)

  • [ x ]    Using GT:NH/GT:New Horizons?
  •    Single Player? - Did not test in SSP
  • [ x ]    Multi Player?
commented

Ran the Debug I guess in this version it's quite limited. If anyone has suggestions of other tools might be worth running:

profile-results-2020-08-27_16.34.49.txt

commented

Brand New Server Hardware, Install, and the Latest Version of GTNH 2.0.9.0 (FRESH START)

Same exact issues on the following specs:
3900x
64gigs of ram
M.2 Drive 3000/3500

openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~20.04-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)

Example:

[15:20:30] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2365ms behind, skipping 47 tick(s)
[15:21:15] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2167ms behind, skipping 43 tick(s)
[15:22:46] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2381ms behind, skipping 47 tick(s)
[15:23:30] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2356ms behind, skipping 47 tick(s)
[15:24:16] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2231ms behind, skipping 44 tick(s)
[15:25:01] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2190ms behind, skipping 43 tick(s)
[15:26:31] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2414ms behind, skipping 48 tick(s)
[15:28:01] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2169ms behind, skipping 43 tick(s)
[15:28:47] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2311ms behind, skipping 46 tick(s)
[15:29:32] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2250ms behind, skipping 45 tick(s)

I tried pruning extra save data like Mineshaft, labyrinth, etc did not seem to make an impact. I don't think the issue is 100% noticeable as well after a reboot right away but I'm not 100% certain.

commented

Temporary work around: I'm in windows so I don't have a whole log of fancy scripting stuff available. I wrote an AHK script that sends commands to my server without taking mouse/keyboard focus to artificially decrease save frequency.

Loop
{
ControlSend,, save-on{Enter}, MinecraftServer
Sleep, 35000
ControlSend,, save-off{Enter}, MinecraftServer
Sleep, 600000
}

Running the server with save-off for a a while does make some weird stuff happen, though. Use at your own risk.

commented

Is this the same world save that was fixed by GTNewHorizons/Galacticraft#8? I'm not sure if that PR was included in 2.0.9.0 or if it won't be until 2.0.9.1.