I have the AWS monitoring scripts set up on an EC2 instance to alert me when memory utilization is over 75%. Currently, I am sending all of the memory related parameters to Cloudwatch, but only have a Cloudwatch alert set up for mem-util.
On Cloudwatch, I see a memory utilization of over 97%
However, when running the top command, I get a very different memory utilization of roughly 74%:
Tasks: 101 total, 1 running, 61 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8166940 total, 212124 free, 6232712 used, 1722104 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 1634048 avail Mem
I saw a similar thread for CPU usage statistic discrepancy, and am wondering if the same issues apply here. More importantly, which of the two is more reliable in the context of managing the available memory?