Refined Storage

Refined Storage

77M Downloads

Server randomly crashing with a large RS network, or instant if too big

Aang23 opened this issue ยท 8 comments

commented

Issue description:

When a very large RS system is in use, the server's TPS drops randomly, and, sometimes, crashes. When connecting 1000 disk drives onto a controller, it's a instant TPS drop to 0.
Note that it's not a performance problem since this is running on a more than powerful enough server (64Gb RAM, 16 cores, etc). This caused maps not to load at all, multiples times. I needed to edit the chunk files manually in order to delete the controller.

What happens:

When a large RS system is being active / activated, there's a TPS drop (the controller's tileentity is the source), and often, a crash.

What you expected to happen:

I expect the system to continue working without that much of an impact on the server. (Maybe multithread the mod?)

Steps to reproduce:

  1. Setup a server
  2. Install a large RS system
  3. Wait, and check the TPS

Version (make sure you are on the latest version before reporting):

  • Minecraft: 1.12.2
  • Forge: 2768 / 2786 (Tried building from Github too)
  • Refined Storage: 1.6.12 (Tried with 1.6.13 from Jenkins too)
  • Sponge: RC3627 (Tried building from Github too)

Does this issue occur on a server? [yes/no] yes, but maybe on singleplayer too

If a (crash)log is relevant for this issue, link it here:

A crash log : https://hastebin.com/enuwexejis.bash (after that one the map would not load)
(The logs only says the tick exceeded 60s)
Timings can be provided if necessary.

commented

Seems to be related to #2193

commented

When you connect and power up a system there is quite a bit of stuff that has to happen in the background for it to work. All of that work happens in a single tick. I am not sure if it's even possible to spread this load over some time or multithread the process to decrease the amount of lag.

What I can tell you for a fact though is that programming that is a week-long project at the very least and that that time could be spent much better fixing some other bugs that are actually critical.

For your specific case what happens is this: If you create a network by powering up an RS system it takes a certain amount of time to create all the related data structures for everything RS does. This time depends on the size of the system.

Minecraft Servers have a monitoring feature. This Watchdog crashes the server, assuming that the game froze, once a specific time has passed while the game is stuck on one game tick. This works well if the game actually freezes but can easily lead to corruption if the game was actually working on something.

What you can do to prevent it is to increase the max-tick-time in server.properties so that next time you connect a network it will finish it's work without being interrupted.

commented

That's an option, but I mean, there's still a TPS hit once the system has been powered up, and this prevents any multiplayer server from using RS.
Edit : I think that spreading that on multiples ticks could be done.

commented

@Aang23 I can offer you a workaround. Also I hope so much that autor(s) of Refined Storage will excuse me for any possible advertising in this.
Often there is no need trying to put a stuff of whole world in RS storage cells, really. Often, in some cases, we have a lot of tons of one item (cobblestone :) ), so we can use another storages with better capacity capabilities, for example, Storage Drawers, which can contain many thousands of our item in 1 drawer-block and even void excess of it and, before I get beaten for advertising, I'll just say you will need only 1 external storage with greater priority than disk drives. And I do not set out to just use another storage, but suggest to use more storages to get benefit from all of them. I suggest to leave all small stacks in the Refined Storage system - it's best for it. The final goal is to significantly reduce the storage complexity, also reducing number of disk drives from thousand to maybe several units.

commented

Storage drawers are also extremely laggy

commented

A man with a very weak computer told me the opposite thing. I suppose, it depends on how many drawers you are use (stack? hundreds?) and is enabled quantity labels on the drawers or not. When we want to shove absolutely everything in drawers - this is the case of another extreme. You need to strive for an optimal balance.

commented

There was something regarding a constant laggy check, i don't remember for what

commented

Please create a new issue with an included nps performance report. Thank you

https://refinedstorage.raoulvdberge.com/wiki/profiling