I have two vm's one with 2vCPU , 4GB RAM and other with 4vCPU and 8GB RAM
Now I have installed / ran the same application(k8s pods) with same memory , cpu allocations , requests , limits on both the VM's.
Observations
- When dumping the entire top output on both vm's and summing up all process's Resident memory I get to see similar numbers on both VM's i.e around 2GB consumed.
- Summing up all the numbers under column VIRT gives
55456748
more or less on both vm's
Question
- However in top command summary / process memory info commands shows different numbers on two VM's , Any pointers on why & where , how to find out the extra memory/root cause for memory consumption 4cPU and 8 GB ?
2VCPU 4GB
$ cat /proc/meminfo
MemTotal: 3880500 kB
MemFree: 144924 kB
MemAvailable: 590280 kB
SwapTotal: 1327100 kB
SwapFree: 1261564 kB
4VCPU 8GB
$ cat /proc/meminfo
MemTotal: 8008964 kB
MemFree: 197860 kB
MemAvailable: 1470412 kB
SwapTotal: 1327100 kB
SwapFree: 1321408 kB
MemFree
. Instead use theMemAvailable
for memory usage.