Is save-all necessary?

Discussion in 'Spigot Help' started by Bobcat00, Jan 24, 2020.

  1. Now that I've switched from CraftBukkit to Spigot, is it still necessary to have Multicraft issue a 'save-all' command every 10 minutes?
     
  2. I don't think that was ever necessary... Minecraft/CB/Spigot automatically saves your worlds every 5 minutes by default.
     
  3. Wasn't true back in 2013 to the best of my knowledge. Lost a lot of work with a crash back then.
     
  4. Optic_Fusion1

    Resource Staff

    If i knew the exact version i could probably look and see if it auto-saved
     
  5. I've always typed save-all before and after some console stuff, just did it automatically. So I still do it, even if it's not needed. It's just an addiction. I will probably not stop doing it.
     
    • Agree Agree x 3
  6. Anyone have a definitive answer on this?
     
  7. bukkit.yml has a ticks-per option for autosave. It's at 6000 by default - every five minutes - so es, running save-all should be unnecessary.
     
  8. Not only is /save-all unnecessary, it also hurts performance because it is synchronous, which means it stops everything and will likely cause a lag spike when run.
    There already exists an autosave feature which is optimized and enabled by default.
     
  9. My autosave is disabled, probably because that was the default in 2013.
     
  10. You can set ticks-per.autosave to e.g. 6000 in bukkit.yml, and then make sure the output of /save-on is "Saving is already turned on".
     
  11. Yeah, set the autosave higher.
     
  12. Not completely sure if it's that useful, but pretty sure it's a backup / save of the server it will revert to in the case of a serious crash.
     
  13. I'm pretty sure it will be fine if your server never crashes but it's good to have I guess.
     
  14. Is it causing lag for you?
     
  15. So I turned off the Multicraft save and enabled the Bukkit autosave. The timings show the periodic autosave is taking 250 to 500 msecs. That's optimized?

    EDIT: I just took a quick look at the code. Both the Bukkit autosave and the save-all command look like they do the same thing, call savePlayers() then saveChunks(). So I guess the question is, what happens if I have them both turned off?
     
    #15 Bobcat00, Jan 27, 2020
    Last edited: Jan 27, 2020
  16. If you're looking to get better autosave performance, I suggest you consider switching to Paper, which saves chunks over multiple ticks to avoid blocking the server thread for too long.
     
  17. it's just save, there are no reverts, changes when they happen don't instantly get saved to file, they are kept in memory, so if your server goes off (electricity cut or due to some reason the server process going off instantly without a time for save), all changes are lost, unless it was stopped nicely with /stop command where it saves OR it was recently saved automatically / save-all command.
     
  18. Ah okay, thanks for clearing that up. I was wondering myself as well.