Option for local MySQL requests be async
See original GitHub issueI’ve been experiencing server lag… I am running paper-298 (currently) and have been trying to track down why I’m seeing lag spikes.
After many timings reports & a suspicion of Dynmap, I set the write interval on the JsonFileClientUpdateComponent writeinterval
to 35
Sure enough, every 35 seconds my server chugs…
[13:13:33 INFO]: Server tick times (avg/min/max) from last 5s, 10s, 1m:
[13:13:31 INFO]: ◴ 1.7/0.3/93.9, 1.2/0.3/93.9, 0.9/0.2/94.5
[13:13:48 INFO]: ◴ 0.7/0.2/2.0, 0.7/0.2/2.3, 0.9/0.2/94.5
...
[13:14:05 INFO]: ◴ 0.7/0.3/2.1, 0.7/0.3/2.1, 0.8/0.2/93.9
[13:14:06 INFO]: ◴ 1.7/0.3/93.8, 1.2/0.3/93.8, 0.9/0.2/93.9
I suspect this issue is often not as easy to detect as most people are running MySQL on their machine. I have a tunnel setup to a web-host that runs the SQL database & dynmap standalone. Hence, my access times are longer & why I have a noticeable slowdown to my server. Also, disconnects from jdbc make server unusable due to constant re-connect requests.
The fix to this is to move dynmap’s database operations off the main thread & make them asynchronous.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
Gotcha - I’ve made a couple of changes in the latest SNAPSHOT builds on https://dynmap.us/builds/dynmap (SNAPSHOT, not the RC builds). Let me know if you give it a try and how it goes.
Understood on the request - I’ll need to see how much of a pain it is: the storage system is abstracted, and most of the I/O is off the server thread, but not all of it.