Unexpected GC Results

14 views
Skip to first unread message

Simon Lundmark

unread,
Jan 28, 2025, 2:28:17 PMJan 28
to LDMud Talk
Hi all,

We're experiencing some weird GC results.

Every day at 0900 (CET) we run a GC. Interestingly enough I saw our memory usage have spikes every day at 0900. So I started to do some digging and we're having measurement of plenty of different statistics of the mud. We've recently hooked up information to grafana in order to get better understanding for things and indeed when the GC is run we're seeing both spikes in free memory but also allocated blocks. In this example the allocated blocks went from 634M to 690M. At the same time our unused memory went from 110 megabytes to roughly 170 megabytes.

When it happened 24 hours earlier (not visible here) it went from 42 megabytes to 170 megabytes.

During these two days, our actual memory usage reported is 465 megabytes just before the first gc and 490 both before and after the second gc.


mud_gc_result.png
The topmost yellow line shows unused memory and the bottom graph shows sys allocated blocks.

If we zoom out and see the last 10 days we get the following result:

mud_gc_result2.png

I started to log the GC and these are the results from the last two GC's:
2025.01.27 05:10:25 --- Garbage Collection ---
2025.01.27 05:10:29 GC pass 1: Freed 527 objects.
2025.01.27 05:10:30 GC freed 0 destructed objects.
2025.01.28 03:00:31 --- Garbage Collection ---
2025.01.28 03:00:37 GC pass 1: Freed 758 objects.
2025.01.28 03:00:37 GC freed 0 destructed objects.

(please ignore the timestamp, the first one had to be called manually).

Could it be anything we are doing in our settings that could be influencing this? Next up for me is start looking at the code so that I can try to understand how the GC actually works.

Thanks,
Simon


Gnomi

unread,
Jan 28, 2025, 2:57:59 PMJan 28
to ldmud...@googlegroups.com
Hello Simon,

Which driver version are you using?

If you're using something older than 3.6.6, this might explain it:
https://github.com/ldmud/ldmud/commit/faaf0453888547c0530c26b28814f4ef8ad3c02b

Greetings,
Gnomi

Simon Lundmark

unread,
Jan 29, 2025, 2:06:11 AMJan 29
to ldmud...@googlegroups.com
Hi Gnomi!

Ahh, yes we are on the 3.5.7 so we don't have that one. I'll see if we can migrate to an even newer driver or backport that one! Thanks!

best,
Simon

--
You received this message because you are subscribed to the Google Groups "LDMud Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ldmud-talk+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ldmud-talk/Z5k2wsyfokwRj1k1%40platinum.motzkau.

Zesstra

unread,
Jan 29, 2025, 3:17:49 AMJan 29
to ldmud...@googlegroups.com
Dear Simon,

one side remark and question out of curiosity: running the GC often is in my
experience not really needed and also doesn't free that much memory, because
the driver is not that bad freeing memory without it. (Unless you use a lot of
cyclic structures.)
Do you have a specific reason/experience for running it regularly?

We try to avoid it and run it basically never manually because we don't want
to have the disturbance while it runs.
Also historically - although nowadays it is much better - we had quite some
crashes caused by the GC likely because it's was less tested/robust than the
rest of the driver. :-(

Best wishes,
Zesstra@MG
--
MorgenGrauen -
1 Welt, mehr als 200 Programmierer , mehr als 16000 Raeume,
viel mehr als 7000 unterschiedliche Figuren, 90 Quests, 13 Gilden,
ueber 5000 Waffen und Ruestungen, keine Umlaute und ein Haufen Verrueckter.
Existenz: mehr als 25 Jahre
http://mg.mud.de/

Simon Lundmark

unread,
Jan 29, 2025, 7:37:53 AMJan 29
to LDMud Talk
Hi Zesstra!

I think it's mostly legacy at this point. We run it once every 24 hours and the mud runs for 10-12 days before rebooting.

I will disable it and see what the behavior is like! Thanks for the suggestion.

Cheers,
Simon
Reply all
Reply to author
Forward
0 new messages