save interval
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board. Its current use is for the continued development of the server and game it has always served: The Mana World.
save interval
Currently, the save interval is 15 seconds. This is probably a bad idea for the disk. We could revert to the recommended default (300 seconds, aka 5 minutes), at the cost of *potential* loss.
This setting is stored in world/conf/char_athena.conf as autosave_time. I suggest this be changed in git for the next restart.
To prevent loss, always @mapexit the map-server, then kill the char-server.
(Note: the login-server is hard-coded to use 5 minutes)
This setting is stored in world/conf/char_athena.conf as autosave_time. I suggest this be changed in git for the next restart.
To prevent loss, always @mapexit the map-server, then kill the char-server.
(Note: the login-server is hard-coded to use 5 minutes)
Former programmer for the TMWA server.
Re: save interval
15 seconds is much too low. I'm surprised multiple save processes are not piling up!
The default of 300 seconds was chosen with some consideration. The idea is that even if the server loses data 5 minutes isn't anything much. Players here understand the software isn't perfect and won't freak out if they have to re-do a whole 5 minutes of gameplay. There's not much you can accomplish in 5 minutes that you couldn't just do over.
The default of 300 seconds was chosen with some consideration. The idea is that even if the server loses data 5 minutes isn't anything much. Players here understand the software isn't perfect and won't freak out if they have to re-do a whole 5 minutes of gameplay. There's not much you can accomplish in 5 minutes that you couldn't just do over.
Head of the TMW Illuminati
Re: save interval
There's an explicit check for that (it will just skip that fork and try again on the next interval), though on the new server it only takes 12 seconds to do a full save. Pretty sure it would delay on Platinum though.MadCamel wrote:15 seconds is much too low. I'm surprised multiple save processes are not piling up!
The thing to beware of is that different players have their data synced at different times. So, items can disappear or appear out of nowhere. Of course, this is the map-server's fault, not the char-server. But, the char-server *does* need to beware of the last-ditch save - that really should not be called from the signal handler (the signal handler should just clear the runflag, like @mapexit)MadCamel wrote:The default of 300 seconds was chosen with some consideration. The idea is that even if the server loses data 5 minutes isn't anything much. Players here understand the software isn't perfect and won't freak out if they have to re-do a whole 5 minutes of gameplay. There's not much you can accomplish in 5 minutes that you couldn't just do over.
Former programmer for the TMWA server.
Re: save interval
Maybe we could make the map server sync a user to the char-server whenever their inventory, zeny, or level changes?
IIRC the original char-server would write it's databases whenever the map-server sent it a player structure.. Updating the char-server more often now that saves are on a timer shouldn't adversely affect anything.
IIRC the original char-server would write it's databases whenever the map-server sent it a player structure.. Updating the char-server more often now that saves are on a timer shouldn't adversely affect anything.
Head of the TMW Illuminati
Re: save interval
Hm, that would explain it. The map-server has comments to the effect that saving is expensive, but it's just network to localhost ...MadCamel wrote:Maybe we could make the map server sync a user to the char-server whenever their inventory, zeny, or level changes?
IIRC the original char-server would write it's databases whenever the map-server sent it a player structure.. Updating the char-server more often now that saves are on a timer shouldn't adversely affect anything.
There probably *should* be some caching in the map-server to make sure it doesn't send duplicate info though. This could maybe wait until I rewrite the whole network layer though.
Former programmer for the TMWA server.
Re: save interval
as an aside, the map server should fork before calling system() to gzip the log files. Alternatively we could have it call a shell script that performs the gzip in the background.
Head of the TMW Illuminati
Re: save interval
Already done in the 'test' branch.MadCamel wrote:as an aside, the map server should fork before calling system() to gzip the log files. Alternatively we could have it call a shell script that performs the gzip in the background.
Former programmer for the TMWA server.