CiscoDevNet / Hyperflex-Hypercheck

Perform pro-active self checks on your Hyperflex cluster to ensure stability and resiliency
MIT License
27 stars 18 forks source link

Free Mem Check Will Most likely Fail on Clusters Prior to HX 2.5 #10

Closed thetopnach closed 4 years ago

thetopnach commented 4 years ago

On HX 2.5 and later, free -m last column is available. They script checks that the value of they last value, which is "available" memory is greater than 2048. The SCVM is running Ubuntu 16.X.

root@hx-01-scvm-01:~#  free -m
              total        used        free      shared  buff/cache   **available**
Mem:          48294       15100       31688           7        1505       **32636**
Swap:             0           0           0
root@hx-01-scvm-01:~#

In HX versions prior to HX 2.5, the free -m output is different. The SCVM is running Ubuntu 12.X

root@SpringpathControllerOKDOHIFZYH:free -m
          Total    used   free         shared buffers **cached** 
Mem: 48306 17785 30520      0        183      **723** 
-/+ buffers/cache: 16878 31427

Since cached is 723, the hypercheck script will mark the memory test as failed.

avshukla commented 4 years ago

Many load balancing and workload placing programs check /proc/meminfo to estimate how much free memory is available. They generally do this by adding up "free" and "cached", which was fine ten years ago, but is pretty much guaranteed to be wrong today.

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo.

available Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free fields, this field takes into account page cache and also that not all reclaimable memory slabs will be reclaimed due to items being in use (MemAvailable in /proc/meminfo, available on kernels 3.14, emulated on kernels 2.6.27+, otherwise the same as free)

Updating the 2.5 and lower version to check for free -m