ZHorse causes high amount of single tick processing
Sandukhan opened this issue · 9 comments
Bug report
What are you trying to do ?
zHorses causes high amount of single tick processing and therefore server lag.
This happens while horses are ported back home, when the player disconnects.
It dosnt seems to be a issue while players do teleport thier horses themselfs, rather them get teleportet by logoff.
From config:
use-default-stable: true
send-to-stable-on-owner-logout: true
After disableing these features, the Pct Ticks goes back to down.
How to reproduce the bug ?
- Claim Horse
- Set stable
- Logoff
Console output
https://timings.spigotmc.org/?url=pesutuxeqa
No errors from zhorse in server logs
Environment specifications
-
Operating system : Linux
-
Java version : 8
-
Server version : Spigot 1.13.2 a1f2566-97b0057
-
ZHorse version : ZHorse v1.7.1
-
Database : SQLite
The chunk ticks are also quite high, the tracking of horses with meta data seems to the issue here.
I cant realy run the plugin on my server with that.
Could you try to use the old (vanilla) teleportation method and see if it works better ?
The config option is Settings.use-old-teleport-method: true
Hi, I had some time to work on ZHorse so I made all database updates asynchronous as well as all heavy-hitting database queries.
This was quite a lot of work so it would be nice if you could check if the changes made in 1.7.2 are helping or not by following these instructions :
- Enable send-to-stable-on-owner-logout and disable use-old-teleport-method.
- Enable & reset timings.
- Run ZHorse 1.7.1 on your server and perform some tests (like making horses go to their stable when you disconnect).
- Paste & reset timings.
- Run ZHorse 1.7.2 snapshot 1 on your server and performs the exact same tests.
- Paste timings.
I did it on my test server and could see a large improvement but I could not check how it scales with the server size.
Also, take note that this is a snapshot and that it includes lots of changes which could break things, so be careful :)
EDIT : Snapshot was uploaded to Spigot thread directly
I did some testing and so far it does look fine. But i would take a bit more time, since we hadnt that many players online at once (around 15 - 25). For better testing i would suggest to look for a bigger server around 50 to 75 players.
I did some more testing and everything looks fine to me.
So it should be fixed as of f487e8c