Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a new system running under VMware, and I'm just trying to make sense of the memory use.

In vSphere client, it shows me active using 335,544 KB:

enter image description here

However, linux shows me using 3,146,148 KB:

root@PFDEV-SVN:~# free -k
             total       used       free     shared    buffers     cached
Mem:       4118636    3146148     972488          0     477216    1268364
-/+ buffers/cache:    1400568    2718068
Swap:      6040400          0    6040400

Why is this so different? Am I just reading this incorrectly?

This is Ubuntu 9.10, without vmware tools installed, running on an ESXi server.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

There is a detailed white paper on the topic of memory management and calculations of the active memory working set size.

It basically all boils down to the fact that a guest is not using all the memory that has been assigned to it all the time. Instead, only certain ranges of memory are considered "active" at a particular time period, making the "inactive" memory a candidate for swapping, if you happen to overcommit your physical memory. You should look at the "consumed" memory if you want to roughly match it up with the memory usage within your host (deviations due to memory pages shared across several VMs may occur).

share|improve this answer
add comment

One would hope that they do not match. One of the purposes of virtualization is to allow many OSes to reside on 1 physical system. One of the things noted when building a hypervisor (like ESX or hyper-v) is tha toperating systems often do not actually use all of the ram allocated to them. hypervisors will accordingly make thta physicla ram available to other OSes allowing you to "overcommit" on the amount of ram available. the downside to overcommiting is that should you run into a situation where each OS actually uses the amout of ram allocated, performance will degrade.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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