TL;DR: I need to put "free memory %" on a dashboard. It doesn't have to be perfect. There is no swap. I want to validate my understanding. Is INACTIVE + FREE close enough?
I know that it's not that simple. Knowing that and explaining it to non-technical people who don't care are different things. Also, they are right.
Use case is simple at least. There's a dashboard people look at and the dashboard needs a gauge/graph letting people know if the machine needs more memory. This is on AWS, the machines have no swap. I understand that free is bad, inactive is good. My question is, in most cases, how much memory can a userland process on the machine request at once (or in quick succession) before it gets itself or others into trouble with the reaper? Like a PHP or NodeJS script. And the reason why I ask here is that I've seen recommendations of other formulas that seem wrong to me.
My understanding is:
Active - can't be freed, userland processes need it.
Wired - can't be freed, kernel needs it.
Laundry - can't be freed right away. This is the purgatory of memory pages, they need to be sorted out first.
Inactive - will be freed any time it's needed.
Free - can't get more free than this.
Buffers/ARC - not a real class, part of Wired. Ignore.
Cache - doesn't exist, though it's still reported by some tools. Ignore.
The fact that these machines have no swap makes the wiki entry a bit confusing.
What happens when the memory is needed but there is no swap to go to? Frees some memory from inactive, right? What about Laundry, does it have a purpose without swap?
I know that it's not that simple. Knowing that and explaining it to non-technical people who don't care are different things. Also, they are right.
Use case is simple at least. There's a dashboard people look at and the dashboard needs a gauge/graph letting people know if the machine needs more memory. This is on AWS, the machines have no swap. I understand that free is bad, inactive is good. My question is, in most cases, how much memory can a userland process on the machine request at once (or in quick succession) before it gets itself or others into trouble with the reaper? Like a PHP or NodeJS script. And the reason why I ask here is that I've seen recommendations of other formulas that seem wrong to me.
My understanding is:
Active - can't be freed, userland processes need it.
Wired - can't be freed, kernel needs it.
Laundry - can't be freed right away. This is the purgatory of memory pages, they need to be sorted out first.
Inactive - will be freed any time it's needed.
Free - can't get more free than this.
Buffers/ARC - not a real class, part of Wired. Ignore.
Cache - doesn't exist, though it's still reported by some tools. Ignore.
The fact that these machines have no swap makes the wiki entry a bit confusing.
What happens when the memory is needed but there is no swap to go to? Frees some memory from inactive, right? What about Laundry, does it have a purpose without swap?