Recent Discussions

Weird GC spike, any ideas what can cause it?

Unanswered
Scott's Oriole posted this in #questions
Messages7 messages
Views0 views
Scott's OrioleOP
I have a server running in a 6GB container, which has around 5500MB assigned to the server.
The question is, having that much ram allocated for the server relatively to the max amount the container has be a possibility for the GC to get a pause this huge (huge in terms of gc pauses, it's like 3 seconds)
This pause is incredibly uncommon and does not have a pattern, sometimes it can happen a couple of hours after starting the server, or can happen after almost a week of the server running.

So far only happens when the server is empty, but since only two people play here then is empty 90% of the time, so idk if that's a factor.

This is the last profile I managed to take while using Paper:
https://spark.lucko.me/NESMz2BRWi
The GC pause also has a nasty habit of happening during my sleeping hours, so it took a month to be around when it happened to stop the profiler in time (and it took me 20 minutes to realise it happened again and stop the profiler).

If you zoom in the spike (looks small but trust, is a full 3s pause, look at the screenshot) the GC thread goes active at that time, but spark only registers a small percentage.

To summarize, the question is if I did assigned too much ram to the server which is causing this spike and therefore just let it be, or maybe that is not a factor and I should keep researching this.
Or maybe this kind of spike is just normal and just so happens that I never came into one before.
This is mostly a curiosity since it's not affecting gameplay in any way (and even if it did, we're just two people, it doesn't matter)
image.png
Scott's OrioleOP
This is an old screenshot of the first time I managed be in my PC at the same time this happened, I'll look for the profiler, but this one wasn't using Paper exactly
image.png
I also have gc log of a time when it happened while I was sleeping. Is not exactly the same as the profile, but is the same issue I assume.
Look at GC(109) at line 157
https://mclo.gs/BzzHsKc#L157
Philippine Crocodile
Are you a dedi? Is your server running on a VM?
This is normal, and yes, this is the pause (It will happen rarely, rarer -> better, but more object allocations will cause it to happen more frequently)
Idk why spark is showing red, I genuinely have no idea, I guess you can enable concurrent gc threads and that should reflect better to spark, you can also prob tell it to spread the gc pause more evenly or smth (if I can think of it there has to be a flag, also basic concept) to reduce the pause ms

Google Remark Pause or just G1GC Remark if you want more information, but simply, the Remark phase figures out which processes are still alive, and which ones are dead / still needed and no longer needed
@Philippine Crocodile Are you a dedi? Is your server running on a VM?
Scott's OrioleOP
Nope, I’m using a shared hosting
The 6gb basic plan from prismnodes to be exact
@Cozend This is normal, and yes, this is the pause (It will happen rarely, rarer -> better, but more object allocations will cause it to happen more frequently)
Idk why spark is showing red, I genuinely have no idea, I guess you can enable concurrent gc threads and that should reflect better to spark, you can also prob tell it to spread the gc pause more evenly or smth (if I can think of it there has to be a flag, also basic concept) to reduce the pause ms

Google Remark Pause or just G1GC Remark if you want more information, but simply, the Remark phase figures out which processes are still alive, and which ones are dead / still needed and no longer needed
Scott's OrioleOP
Yh, I have no idea why spark was red in the ss either :KEKW:
I caught that one seconds right after it happened compared to the spark I sent, which I caught 20 mins late, not sure if it could be an explanation.
What caught my attention was that swap was almost at the limit in both occasions tho

I read a little bit about pause remark and looked like it was related to weak references, which I guess might be coming from my plugins since neither my software or paper make heavy use of weak references.
I’ll research the topic again later 🫡
At least now I know this is normal behavior, thx
Loading...