Page 1 of 1

Non-blocking saving on player connection

Posted: Sun Aug 05, 2018 3:20 pm
by Atraps003
Non-blocking saving currently applies to manual saves and auto-saves. I speculate that it would be reasonably easy to implement for player connections as well?

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 3:38 am
by Atraps003
A picture to help explain.

https://imgur.com/a/YjHVomD

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 5:34 am
by Koub
Either I don't understand, or you're wrong : I am blocked upon save when I play solo (both for manual and auto-saves)

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 5:58 am
by posila
Koub wrote:Either I don't understand, or you're wrong : I am blocked upon save when I play solo (both for manual and auto-saves)
Non-blocking saving is an option on Linux and macOS.

It has not been implemented for saving on player connection, because then connecting players would have to start receiving input actions before they start downloading the map, which adds big complexity to player connection, and mostly because it seems to us people would rather have auto-pause when player is connecting, so the connecting players don't have to catch up the server after downloading the map.

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 6:01 am
by Zavian
@Koub there is an option for non blocking saves. (I forget whether it is linux only on also available on OSX, it's not available on windows).

Having said that, personally I don't think non-blocking autosaves for players joining will be that useful. Whilst it would prevent a pause when someone joins, it will mean they will end up taking longer to catch up. For large maps (ie where the pause to save for joining is most significant), the groups I've played with often end up pausing the game to help players catch up anyway.

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 6:04 am
by Zavian
@posila. Then please implement (either as an option, or just as always on behaviour) that a server that is paused because no-one is connected, does not unpause until someone finishes downloading the map. For me, that map download is often 5-10 minutes followed by 30 mins of catching up, if I'm the first player to join.

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 6:35 am
by Koub
Zavian wrote:@Koub there is an option for non blocking saves. (I forget whether it is linux only on also available on OSX, it's not available on windows).
Linux only, because of OS constraints.

Re: Non-blocking saving on player connection

Posted: Thu Aug 09, 2018 4:21 pm
by Atraps003
@posila. Then please implement (either as an option, or just as always on behaviour) that a server that is paused because no-one is connected, does not unpause until someone finishes downloading the map. For me, that map download is often 5-10 minutes followed by 30 mins of catching up, if I'm the first player to join.
We already have that feature? Or does the server unpause before the first and only player is finished downloading the map even if this is set to true? If that's the case I would consider it a bug. A player can't be present if they don't have the map.

Code: Select all

  "_comment_auto_pause": "Whether should the server be paused when no players are present.",
  "auto_pause": true,
Having said that, personally I don't think non-blocking autosaves for players joining will be that useful. Whilst it would prevent a pause when someone joins, it will mean they will end up taking longer to catch up. For large maps (ie where the pause to save for joining is most significant), the groups I've played with often end up pausing the game to help players catch up anyway.
I disagree. A group of people waiting for one person is not an efficient use of time on public servers. It also introduces a dos attack vector.

Non Blocking Saving

Posted: Sun Apr 05, 2020 10:51 am
by Ghoulish
Might it be possible to expand the non blocking feature so that it is also used when players join a server?

Using this feature (which I have not had an issue with to date) Really highlights the pauses that happen when players join the server. Be a nice additional step to give a little more uninterrupted gameplay.

For those curious, non blocking saving forks the save process and allows it to happen in the background - game play is uninterrupted. Only works for UNIX systems.

Re: Non Blocking Saving

Posted: Sun Apr 05, 2020 3:28 pm
by Jap2.0
I believe it can be used on Unix servers; beyond that I'm not entirely clear, I think it's largely OS limitations? It would be a nice thing to have.

Re: Non-blocking saving on player connection

Posted: Sun Apr 05, 2020 5:34 pm
by ssilk
Ten seconds more investment into search would save me to move this into the already existing thread. :)

And BTW: This option works on Linux und MacOS and AFAIK is not so easy to implement under Windows.