I am using watch -n 5 free -m command via terminal to watch the memory fluctuate as I run virtual box with a guest that is limited to 4GB of RAM(it allocates 4GB on start of virtual guest).

Under USED its showing 3 diffirent figures: Mem: 7984 (example) -+ buffer/cache: 4811 Swamp: 0

What is -+ buffer/cache?

The reason I ask is because before I run Virtualbox I'm using about 800mb. I told Virtualbox to use 4GB. So in my mind -+buffer/cache is using the memory allocated to VirtualBox +system used memory. However I don't understand Mem: So am I using close to 8GB? Could someone clarify the outputs to this command?


Yes, you are using close to 8GB. Specifically, you are using 7.984GB. This is good. The whole point of having memory is to use it. Memory that's not being used is no better than memory you don't have.

If you're thinking "I want memory free now so I can use it later", get that out of your head. You can use the memory now and use it later. It's not possible to use 6GB now so you can use 10GB later. You always have 8GB available for use, that's how it is.

On a typical system, most of the memory will hold information that can be regenerated if needed. For example, when a program writes to a file, that information can be kept in memory to save disk I/O if another process reads that file. However, if memory is needed for other purposes, that memory can be used for another purpose because the data can just be read back from disk. The buffer/cache memory is the amount of memory holding things that don't have to stay in memory if there are better uses for that memory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.