Discourse Docker HW reserved/used (CPU, RAM, Disk) and how to manage it

Thanks for the images - I would mostly monitor the top one, the pages per second. If you see sustained activity then you need more memory. Short spikes like we see in your picture are fine. The max figure you have is under 1000, and presumably your system is healthy. So, watch for sustained activity exceeding say 500 pages per second.

Essentially, RAM is fast and swap is slow. The operating system will make as much use of the RAM as it can, and this is why “unused RAM” isn’t easy to measure or think about. In your case, the big red proportion is RAM used to cache disk contents, which helps application performance. If that green proportion grew to more than say three quarters, that would be worrying. Maybe for some workloads, more than a half would be worrying.

But what really hurts performance is swap activity, because swap is slow. Some static amount of swap usage is not important: that’s the top slice, the purple one. In your case, max swap usage is under 2G, compared to your 8G - you have lots of capacity. If max swap usage gets close to the amount of swap space you have, you might have a system crash imminent. Otherwise, not a concern.

So, watch for sustained swap activity, or for the red disk cache to be squeezed by the green application use.

2 Likes