Why the numbers of "free" don't add up?

          total        used        free      shared  buff/cache   available
Mem:        3.9G        1.2G        142M        2.0G        2.5G        364M
Swap:          511M        510M        2.0M

The above is the result of running "free" command.
I've been trying to figure out how the numbers can be added up to the total(3.9g) to no avail.
Can someone explain this please?

Also, maybe I should create a new post but could someone tell me why my available memory is so low? This server is just used to host some very small sites with no more than 20 visitors each day. But from time to time I see a 100% memory usage. I feel like there must be some misconfiguration but don't know how to find it.

This screenshot shows memory usage from webmin's interface.

This screenshot is the result of "top"

1 Reply

If you look at the columns, they will line up like this, in a better to read format.

total available memory: 3.9G
used memory: 1.2G
free memory: 142M
shared memory: 2.0G
buffered memory / cached memory: 2.5G
available memory: 364M
Total swap: 511M
Used swap: 510M
Free swap: 2.0M

I tend to use the first two numbers in the first columnized numbers. In this case, your server has 3.9G of memory that your operating system can use. Currently, there is 1.2G of memory being utilized via processes that have used memory or cached pages to use later, etc, etc. You're using 510M of swap space. Rounded up from its precise value, and there's 2.0M of free swap space. Probably rounded up from its precise value as well. Ram is a more complex system than I know how to explain fully. Someone else may know more information, I usually just stick to the basics.

Being blind, I can't help you out with your screen shots. However, I would agree with you, there is probably something that isn't configured correctly in your servers configuration somewhere, to be using so much memory at one time. Someone else may be able to direct you on those aspects.

Hopefully, this was helpful to you in some manner.

Good luck,
Blake

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct