An inquiry into why plugins like Save/Load lag servers so badly

just title.

I had a hoster who wanted to ran a creative server. OK no prob, hook him up to my MySQL database and boom done. But (I assume) the added latency of sending all the info to my machine, then back was too much (on his internet atleast).

So instead I created a local MySQL server on his computer, and the problem at hand was severely lowered, but there was still a notable amount of lag everytime someone /save’d their kit.

Furthermore, I recently found a server network that runs Creative servers, and they suffer from EXTREME lag everytime someone saves their kit, and I essentially crashed the server by spamming /save. I tried to tell the Owner that he needs to put the MySQL locally on the same machine, to which he said it already was.

I’m not familiar with coding or how Unturned works. What is the cause of all this lag, just guessing without actually looking at the code for reference. Is the server stalling because its waiting for the operation of the plugin (saving someones inventory and kit) to the database? That would be dumb though, and lead to this. I speculate that (hopefully) plugin creators aren’t that dumb.

But then what would it be? If its not computation power, or latency between server and database, nor read/write speeds, then what could possibly be the source of such horrible lag, if not the plugins own terrible code and/or Unturned’s terrible behavior?

The SaveLoad plugin found on the RocketMod Harbor was an early plugin and was quite poorly created. Each MySQL connection/query is on the main thread which blocks it. In addition to that, I believe the plugin creates multiple connections for each Item in a User’s inventory which adds to the lag.

1 Like

Yet why has nobody made a better plugin? I dont think I’ve seen any better alternatives, and almost every creative server runs this.

And why wouldn’t plugins want to use alternative threads to reduce load on the server? I’d assume all plugins do this by default to ensure efficiency.

And expanding further, since you claimed its per item, that would mean I could lag the server harder by having a wide assortment of crazy 1x1 items in my inventory?

sucks.

That’s just how it is. I’ve created my own version of the plugin which reduces lag massively but it’s for personal use and is not going to be public. Many Server owners do not have the knowledge to develop their own so they stick to the ones that the find publicly which in this case is one that lags. Feel free to develop one yourself though.

1 Like

hecc

I understand keeping plugins to yourself to prevent unfair, exploitative, or crappy servers from profiting off of your content, but is that why you choose to keep it private? Or so your servers are simply more competitive? just curious

also if you’re in it for competition, I might as well suggest you turn Authoritative Physics off on your server, which would end rubber-banding.

I keep it to myself as the version I developed is currently experimental. It’s not yet finished and has some minor bugs. Only one other Server has access to it and that is ACK. One day I may release it once it’s completely finished but I doubt that as it has some of my own specific features which helps integrate it into my Website.

As for your last point, I will look into it. I haven’t played Unturned for months so I have no idea how bad the rubber-banding is on my Server.

1 Like

I’ll be glad to use the pub ver if you ever release it. Thanks for answering.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.