YunoHost Monitoring 101

Hi everyone!

Thank you so much for the gratitude, I am glad I was able to spark a valuable conversation.

Nevertheless, allow me to point out that the conversation steered mainly towards software and tools, but my greatest confusion is about the metrics. I would love to understand what are indicators of the server being too much under stress. For example:

  • what’s an acceptable percentage of CPU usage in normal times (e.g. while not performing transcoding, conversions, intensive processes…)
  • if the RAM is usually at 50%, is it too much or it’s a fairly regular load?
  • What are good I/O parameters?
  • What are good practices of things to check and evaluate before installing a new app?

It’s not much about how to check for metrics (even though that’s important, too, and I am glad many interesting things have been shared) but what to check and how to evaluate if the server is running smoothly.

This is the hardest and most complex part, but definitely the most valuable.

I think the answer is less in relative (percentage) numbers, and more in absolute numbers (MiB, load) and it depends on what are your server’s resources and what all you are running there.

Luckily, YunoHost apps lists what is their expected memory usage. This might be a good starting point. (Yes, I realise, many may be bogus numbers, but that’s a good opportunity to correct those.)

So let’s say you run:

So it would be safe to assume that anything below or around 1412 MiB is well within normal.

I don’t know if YunoHost already implements this, but this sounds like a relatively low-hanging fruit to implement as a user-friendly warning that something RAM use is (way) higher than anticipated.

Regarding load, it depends on how many cores you have. Rule of thumb, from what I gather, is that load should be lower than the number of cores.

So if you have an old ARM board with just one core, a load of 2 might already be problematic, but if you have a more beefy CPU with 32 cores, a load of 16 may still be quite comfortable.

You should consider them as order of magnitude, and quite bare minimum values. Nextcloud for instance will easily require much more than 500MB of RAM given any multi-user or high trafic or load use case, even in short spikes.

It did look quite low for NC :wink:

But I guess that still is something we can consider then. The number of users is also something YNH would know and we could calculate that into a “minimum RAM usage” vs “normal-ish RAM usage” vs “something’s clearly off”.