Hi all. Welcome to 2025
I'm hoping for some insight from all you smart people. It's a bit Linux-ish, but also relates specifically to Xymon's architecture.
I have a pair of hosts both independently running the Xymon server, and pretty much configured the same (both hardware and software). Around 3-4 months ago, swap usage started steadily climbing. One one server it's at 30% and on the other server swap utilisation reached 70% before I (today) restarted xymond_rrd (the one that handles the status channel, not the data channel) at which point swap usage dropped down to 8%.
There are no indications of any performance impact. RAM usage is under 50%, and swap in/out rates are extremely low (essentially zero for swap-in). I'm not a kernel guru, but my reading around suggests that the Linux kernel sometimes swaps out allocated-but-inactive RAM pages just in case there might one day be a shortage of RAM. So it seems there may be proactive swap-outs, although I don't know what might trigger this behaviour.
I'm seeking opinions on what this might mean, and what actions, if any, I should take. RAM is 64GiB and the swap partition is 2GiB.
I'm wondering if this climbing usage of swap might simply be a consequence of how xymond_rrd works. I know from reading bits of Xymon code (with limited understanding) over the years that Henrik did a fair bit of memory gymnastics to preallocate buffers and grow them dynamically as required - far more complex than my brain can understand, but no doubt achieving stellar levels of performance. But it seems only this one process instance is consuming swap space over time, and I'm wondering if it has something to do with how RRD files are re-written, perhaps using memory-mapped I/O or some other fancy techniques that I know almost nothing about?
Cheers
Jeremy
_______________________________________________