Jessassin / ZombieSP-Dev

CommandHelper package set for my Minecraft server... not sure on the name or objective at this point.
3 stars 1 forks source link

Queries cause server thread to hang, causing low TPS and stuttering. #7

Closed Jessassin closed 4 years ago

Jessassin commented 10 years ago

In order to handle this better, we should cache the queries locally, or run them async. The current implementation will work through beta, but should be fixed before release.

CTMiner commented 10 years ago

Would this be the redis thing you mentioned on twitter?

Jessassin commented 10 years ago

Redis, SQLite, or persistance - have not decided yet. @scienceguru1

CTMiner commented 10 years ago

Just thought of this: from what I recall, with SQLite you can only have one query running at a time because it locks the file. This may be worth verifying, if it's true than it probably won't work for this. Also, if you mean persistence as in store_value(), than that just uses the database or file you specify somewhere, somehow.

Jessassin commented 10 years ago

It may only allow a single query at a time, but it will be far faster than the latency between the server and the SQL server. Store_value() would have the same issue.

Jessassin commented 4 years ago

It turns out, having a faster SQL server has pretty much eliminated this issue. Most blocking SQL calls can be made async as well. Finally, I can reduce the number of calls in general - many of them are wasteful.