Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

JsonFileClientUpdateComponent causing excessive hangups on Spigot 1.11.2 server #77

Open
DillonN opened this issue Jan 7, 2017 · 3 comments

Comments

@DillonN
Copy link

DillonN commented Jan 7, 2017

Not sure if this is specific to 1.11.2 or 1.11, but I recently noticed the server lagging for about 200ms every second. Upon analysis with the timings command, this method is using a huge amount of CPU.

Running on an i5-2500k with 3GB of RAM to the server, Ubuntu 16.10. Not usually more than 2 people online ever. Spigot version git-Spigot-7d78b81-d5e7885. Using an external webserver (Apache)

This is out of 679s:

2017-01-07

@chuushi
Copy link
Contributor

chuushi commented Mar 2, 2017

I may be wrong, but I believe the issue is with the disk IO. JsonFileClientUpdateComponent makes Dynmap write a JSON file to disk (not RAM) every time it update (2 seconds by default), and writing to disk can take some time. I'm not sure if it caches the file on disk or actually writes to the disk, but I know it writes to the disk at a regular interval.

I made a small hack that makes dynmap write to tmpfs (RAM) for now, but that's some advanced stuff. Dynmap hasn't lagged my server so far.

@DillonN
Copy link
Author

DillonN commented Mar 8, 2017

Thanks, I was able to fix the problem a while back. I don't remember exactly, but I think disabling chat was what did it.

I wonder if it would be possible/better to write this stuff to the MySQL server instead?

@rautamiekka
Copy link

rautamiekka commented Mar 9, 2017

tmpfs is backed by the swap in case of something happening to the computer, while ramfs ain't. Besides, the swap tends to kill the performance of the whole computer, at least in computers I've had, although rarely on a desktop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants