Page 1 of 1

Flush Blueprint storage to disk

Posted: Sun Feb 23, 2020 5:45 pm
by darklich14
I often lose blueprints when the game crashes because I have not exited gracefully for the blueprints to be saved to storage. Can this be done on some interval and/or have some manual client-side command to trigger a blueprint storage flush? Thank you in advance!

Re: Flush Blueprint storage to disk

Posted: Mon Feb 24, 2020 9:32 am
by Rseding91
darklich14 wrote: Sun Feb 23, 2020 5:45 pm I often lose blueprints when the game crashes because I have not exited gracefully for the blueprints to be saved to storage. Can this be done on some interval and/or have some manual client-side command to trigger a blueprint storage flush? Thank you in advance!
The game is not meant to crash. We put a *lot* of effort into making sure that doesn't happen. So, we would rather fix what ever is crashing than add in extra logic for saving stuff.

Re: Flush Blueprint storage to disk

Posted: Mon Feb 24, 2020 2:30 pm
by darklich14
I must admit that more often than crashing it's that I have to kill factorio becuase my computer becomes unresponsive from extremely large maps. I'm really not sure there is a workaround for this that doesn't involve more hardware so being able to manually trigger blueprint storage synchronization will essentially always be on my want list.

Re: Flush Blueprint storage to disk

Posted: Mon Feb 24, 2020 3:23 pm
by Rseding91
That sounds like you're running out of RAM and have the page file disabled. Normally Factorio would just slow down in that scenario provided the page file is enabled.

Re: Flush Blueprint storage to disk

Posted: Mon Feb 24, 2020 5:39 pm
by darklich14
I haven't generally attempted this in single player - it's typically a multiplayer situation. I generally will drop when I get too bound up on a map my computer can't keep up with but there are some unpredictable permutations of conditions which will grind my entire machine to a halt and only if I'm lucky will I be able to get to a terminal to kill the process. In this situation, swap is thrashing and it just never recovers. On occasion this will happen while attempting to connect to a server with a large map as well. I know it definitely tightly correlates with RAM utilization, but this is sort of why I'd like a way to flush to disk before "doing something risky". I could completely close the client and reconnect, but that means I could be spending 10-15 min restarting and reconnecting and catching up to a "hot" map. I hope this can sort of contextualize why this goes beyond minor convenience and something that would really make a difference for me.

Re: Flush Blueprint storage to disk

Posted: Tue Feb 25, 2020 10:46 pm
by ssilk
Sounds to me like a heat- or memory-problem... tested that?

Re: Flush Blueprint storage to disk

Posted: Wed Feb 26, 2020 4:29 pm
by darklich14
I don't really know to say it any other way than that being able to manually flush something to disk that should be persisted is a fairly normal feature for libraries, frameworks, applications, etc. The diversion from the core of the issue here isn't ultimately helpful I don't think.

Re: Flush Blueprint storage to disk

Posted: Wed Feb 26, 2020 4:46 pm
by mrvn
Why does that even have to be manual? The blueprint library isn't changed often and only by user action. Why not simply write it after every change?

Re: Flush Blueprint storage to disk

Posted: Wed Feb 26, 2020 4:56 pm
by Oxyd
mrvn wrote: Wed Feb 26, 2020 4:46 pm Why does that even have to be manual? The blueprint library isn't changed often and only by user action. Why not simply write it after every change?
A huge library with a lot of large blueprints could take a significant amount of time to save.

Re: Flush Blueprint storage to disk

Posted: Mon Mar 02, 2020 10:27 am
by mrvn
Oxyd wrote: Wed Feb 26, 2020 4:56 pm
mrvn wrote: Wed Feb 26, 2020 4:46 pm Why does that even have to be manual? The blueprint library isn't changed often and only by user action. Why not simply write it after every change?
A huge library with a lot of large blueprints could take a significant amount of time to save.
If that is really a concern then use a format that can be updated. Unless you import a huge blueprint book or delete one the individual changes are small. And really deletion should just mark entries as deleted and allow recovery.

It would also be a good way to work out why saving in the background doesn't always work. Saving the blueprint library should be an easier test case to debug this.

Re: Flush Blueprint storage to disk

Posted: Wed Mar 18, 2020 6:07 pm
by darklich14
Rseding91 wrote: Mon Feb 24, 2020 3:23 pm That sounds like you're running out of RAM and have the page file disabled. Normally Factorio would just slow down in that scenario provided the page file is enabled.
I am on round 3 this week of losing blueprints because I can't flush them to disk and for some reason or another while I'm AFK on a multiplayer server, I'm never able to recover when I come back. I wish that I could somehow alter your perspective on this subject. It is very frustrating. That is not to say obstinate requests are not frustrating, but I feel as though you've told me that I am wrong for requesting something reasonable.

Re: Flush Blueprint storage to disk

Posted: Wed Mar 18, 2020 7:36 pm
by Rseding91
darklich14 wrote: Wed Mar 18, 2020 6:07 pm
Rseding91 wrote: Mon Feb 24, 2020 3:23 pm That sounds like you're running out of RAM and have the page file disabled. Normally Factorio would just slow down in that scenario provided the page file is enabled.
I am on round 3 this week of losing blueprints because I can't flush them to disk and for some reason or another while I'm AFK on a multiplayer server, I'm never able to recover when I come back. I wish that I could somehow alter your perspective on this subject. It is very frustrating. That is not to say obstinate requests are not frustrating, but I feel as though you've told me that I am wrong for requesting something reasonable.
I can give you my personal opinion: I think your play style is wrong. At no point should anyone be "AFK" anything in Factorio.

Re: Flush Blueprint storage to disk

Posted: Wed Mar 18, 2020 10:27 pm
by darklich14
Rseding91 wrote: Wed Mar 18, 2020 7:36 pm
darklich14 wrote: Wed Mar 18, 2020 6:07 pm
Rseding91 wrote: Mon Feb 24, 2020 3:23 pm That sounds like you're running out of RAM and have the page file disabled. Normally Factorio would just slow down in that scenario provided the page file is enabled.
I am on round 3 this week of losing blueprints because I can't flush them to disk and for some reason or another while I'm AFK on a multiplayer server, I'm never able to recover when I come back. I wish that I could somehow alter your perspective on this subject. It is very frustrating. That is not to say obstinate requests are not frustrating, but I feel as though you've told me that I am wrong for requesting something reasonable.
I can give you my personal opinion: I think your play style is wrong. At no point should anyone be "AFK" anything in Factorio.
Appreciable. What do you recommend someone do who plays exclusively on a multiplayer megabase server? I've been doing this playstyle for 2 years now. I've been doing it wrong for quite a long time. The reason I afk is because my ability to contribute is limited because of life balance parameters, and so I afk so that I can play for 20 minutes or so and not spend time opening factorio, downloading the map, loading the map, catching up, contextualizing, etc. My network is decent and my hardware is decent, so when I do have time to play, how am I supposed to play the right way?

Re: Flush Blueprint storage to disk

Posted: Sat Mar 21, 2020 10:35 am
by ssilk
I think this is a good question, but really have no answer; only that it is more clever to fix a hardware problem than to implement a feature into software that tries to go around a hardware problem. :)

Re: Flush Blueprint storage to disk

Posted: Tue May 05, 2020 3:02 pm
by darklich14
Rseding91 wrote: Wed Mar 18, 2020 7:36 pm
darklich14 wrote: Wed Mar 18, 2020 6:07 pm
Rseding91 wrote: Mon Feb 24, 2020 3:23 pm That sounds like you're running out of RAM and have the page file disabled. Normally Factorio would just slow down in that scenario provided the page file is enabled.
I am on round 3 this week of losing blueprints because I can't flush them to disk and for some reason or another while I'm AFK on a multiplayer server, I'm never able to recover when I come back. I wish that I could somehow alter your perspective on this subject. It is very frustrating. That is not to say obstinate requests are not frustrating, but I feel as though you've told me that I am wrong for requesting something reasonable.
I can give you my personal opinion: I think your play style is wrong. At no point should anyone be "AFK" anything in Factorio.
I've been able to put a dent in this problem by adjusting swappiness to 5. Debian's default of 60 is too aggressive and swaps everything out to disk "just because". You can imagine how a 12GB factorio swap going all to disk can thrash for quite some time before regaining responsiveness.

https://unix.stackexchange.com/question ... management

I still think there's nothing inherently wrong with factorio being a glorified idle game, but to each their own I suppose.