How is memory usage calculated

Hi,

I'd like to understand how ECE console calculates memory usage per node, because the numbers don't add up for me. I will describe my situation:

I have a cluster, 7 GB ram per node. ECE shows me 70 % JVM memory used for one of them. When I check related docker container memory usage (docker stats {container_id}), it shows me 4 GB used / 7 GB total. This seems to be correct since Elasticsearch got assigned 50 % of 7 GB which is 3.5 GB + JVM process takes some additional memory. OK. I went into the container and verified the memory used by JVM is indeed 4 GB.

However, 4 GB is not 70 % of the assigned memory, it's just 57 %, so where is ECE taking the memory usage from?

Any help appreciated.

The 70% was presumably "JVM memory pressure"

In your example, the JVM takes ~4GB of the 7GB docker (leaving ~3GB for the cache, see ES recommendations). What the 70% means is that of that 4GB, 70% is "used".

Generally it's best read as a gauge with an arbitrary scale - where empirically if you see numbers consistently in the 60s and even more so the 70s you will likely encounter load related issues some of the time and should consider resizing/clearing data.

(I believe we take the value directly from _node/stats)

Thanks Alex for the provided explanation. I found jvm heap size and the current usage in _node/stats as you stated and it makes sense now. It's just a bit confusing that the gauge shows 70% of 7 GB even when it's actually 70% of 4GB.

Anyway, I understand it now. Thank you.

Ondrej

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.