On Wed, 23 Oct 2024 at 09:42, Henrik Morsing via GLLUG <[email protected]> wrote: > Good morning, > > This is something that has caused problems as long as I have worked with > Linux. How do you accurately monitor virtual memory usage and alert before > applications start to suffer but in a meaningful way and without being > wasteful. > > # free -h > total used free shared buff/cache > available > Mem: 62Gi 26Gi 1.1Gi 33Gi 35Gi > 2.4Gi > Swap: 4.0Gi 3.9Gi 69Mi > > (Output from free version 3.3.15) > > In the above, I wouldn't just blindly go by "available" (our current monitor > adds up total virtual memory) but Red Hat "support" says that would be the > most sensible number to look at without a deep dive. > > I'm surprised it is not something that appears to be looked at much. Almost > all places I have worked, they just have a paging space monitor and then > freak out when it goes above 20%. Not something I have ever been a fan of. > > How do you do it? (If you do monitor memory).
Hi, It is sometimes useful to monitor applications more than just the whole system totals. For example, Java programs have some good memory usage metrics. One can also aim to write programs slightly differently, such that they self limit their memory usage and trigger alarms when they are overloaded with work to do. So, instead of using too much memory, they instead limit the rate of requests they handle, thus limiting their memory usage. An application knows far more about its own behaviour than any monitoring tool, so having the application surface more useful metrics that the monitoring tool can read tends to work quite well. Kind Regards James -- GLLUG mailing list [email protected] https://mailman.lug.org.uk/mailman/listinfo/gllug
