Jump to content

Change SaveWorldEveryMinutes default to a reasonable interval


dgl

Recommended Posts

SaveWorldEveryMinutes is off by default, which can lead to progress loss that can be especially huge for dedicated servers with long uptime. Also, since multiplayer is still pretty new, server issues and crashes during world save are very likely to happen. There are also very common OOM crashes when a server admin fails to allocate adequate heap memory for their player count, which also crash the process before the world has chance to save to disk.

 

Setting SaveWorldEveryMinutes to a reasonable default like 15-30 minutes should help significantly improve player experience.

Link to comment
Share on other sites

Agree it doesn't guarantee full recovery, but it increases chances of getting a more recent world save. Right now you can easily lose multiple days of player progress unless you enable this option.


Increasing the amount or RAM is a great advice but it doesn't help players who already lost days of progress because of default 2 GB heap size (btw maybe we can make server launcher reserve dynamic heap memory? I think most players would prefer reserving memory based on total available RAM rather than having a static default amount)

Edited by dgl
Link to comment
Share on other sites

  • 4 weeks later...
On 12/23/2021 at 11:06 PM, EnigmaGrey said:

Causes lag + doesn’t guarantee a save.

 

increase the amount of ram or lower max player account. 2gb + 500 mb per player.

 

No guarantee you’ll get a clean save after any crash. Any open output buffer will print zeros or junk.

 

2GB + a half per player doesn't seem to cut it. I run vanilla, and regularly exceed 6 GB or even 7.5GB with just 4 concurrent players. I filed a half-assed bug report on this:

 

 

As for buffers and saving not being reliable... naturally don't know the specifics in this case, but perhaps a copy and swap approach would work? Ie. save changes to a copy of the data, and make the swap (copy replaces original) after successfully writing the changes?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...