TerminatorNL / LagGoggles

A minecraft forge mod which visualises lag in the world
GNU General Public License v3.0
54 stars 20 forks source link

[Feature Request] Profile only on ticks where there is significant lag #32

Closed john01dav closed 4 years ago

john01dav commented 6 years ago

Hello,

My server currently has an issue where specific ticks end up taking a very long time (1-5 seconds), with those very long ticks occurring about 10 seconds apart from each-other. The vast majority of ticks, however, happen in a reasonable amount of time such that all tps commands say the tps is 20. I have also ruled out GC causing the issue via /sampler memory, which gives the ppm of server uptime used for GC. As such, I would like to request that Lag Goggles add a mode where it will collect data each tick, but then disguard that data for any ticks under a, ideally configurable, threshold (ie. 1 second), to allow lag spikes in particular to be measured. I can not use sampler's stall report mechanism for this, since it only makes a report after a 30 second tick, and the problematic ticks rarely take more than 5 seconds.

Thank you

TerminatorNL commented 4 years ago

Profiling itself is also a pretty intensive operation. This is one of the reasons that there's a configurable limit for profiling for players. If I were to profile all the time, you'd lose a lot of performance you could otherwise have spent actually ticking the world and being useful!

However, I am not opposed to this idea, it might take me a while to implement it as this is not top priority right now.