11 Replies Latest reply on Feb 2, 2014 3:18 PM by maxel

    Consumed Host Memory vs Active Guest Memory

    shane.presley Hot Shot

       

      Could someone explain the "Consumed Host Memory" and  "Active Guest Memory" as displayed in the vCenter Client?

       

       

      I have a RedHat VM that is assigned 4GB, but Consumed is about 1.3GB, Active is 600MB.  

       

       

      Thanks

       

       

        • 1. Re: Consumed Host Memory vs Active Guest Memory
          lamw Guru
          VMware EmployeesCommunity Warriors

          Here is the definition from the vSphere API reference document for memory metric for the various entities: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/memory_counters.html

           

          Consumed Host Memory - Amount of machine memory used on the host. Consumed memory includes Includes memory used by the Service Console, the VMkernel, vSphere services, plus the total consumed metrics for all running virtual machines.

           

          Active Guest Memory - Amount of guest “physical” memory actively used.

           

          Another set of good documents for performance metric information are these as well:

          Memory Performance Analysis and Monitoring

          Interpreting esxtop Statistics

           

           

           

           

           

           

           

           

          =========================================================================

          William Lam

          VMware vExpert 2009

          VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

          Twitter: @lamw

          vGhetto Script Repository

          Getting Started with the vMA (tips/tricks)

          Getting Started with the vSphere SDK for Perl

          VMware Code Central - Scripts/Sample code for Developers and Administrators

          VMware Developer Community

           

          http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

           

          If you find this information useful, please award points for "correct" or "helpful".

          • 2. Re: Consumed Host Memory vs Active Guest Memory
            shane.presley Hot Shot

             

            Thanks, those docs were helpful.  The explanation of the memory counters seems to make sense, but it's still not clear to me as it's presented within the vCenter Client. 

             

             

             

             

             

            "Consumed Host Memory" is show on every VM summary page, and seems to represent the memory usage that the VM is using, not the host overall.  For example on vm1 it might show 600MB and on vm2 it might show 8000MB. 

             

             

             

             

             

            So I don't think it includes service console or anything else.  It seems to be representing what that single VM is using on the host.  But then I'm not sure how that compares to Active Memory (which is always much lower).  

             

             

            • 3. Re: Consumed Host Memory vs Active Guest Memory
              lamw Guru
              Community WarriorsVMware Employees

              If you're looking at the VM tab, there are 3 columns that you may be seeing:

               

              "Host CPU - MHz"

              "Host Mem - MB"

              "Guest Mem- %"

               

              The metrics here is showing you how much of a particular VM is consuming from the ESX(i) host that it's being hosted on. Yes, you're correct that active memory is generally lower but it does not always have to be. This is just a metric to show you how much of that memory is actually being actively used from the overall allocated memory.

               

              For example I have a 2vCPU x 2GB vMEM

               

              Consumed cpu is 359 Mhz from the host

              Consumed mem is 1.67GB from the host (this is what the host has allocated to the VM)

              Active guest mem 204 MB (the current amount of active guest memory in the OS)

               

              When you asked earlier what is "Consumed memory", I thought you were referring to the ESX(i) host metrics. The values you're looking at here, refers to a VM and per the reference doc:

               

              "Consumed Memory" for a VM is:

               

              Virtual machine:   Amount of guest physical memory consumed by the virtual machine for guest memory. Consumed memory does not include overhead memory. It includes shared memory and memory that might be reserved, but not actually used. Use this metric for charge-back purposes.

               

              Hopefully this makes more sense.

               

               

               

               

              =========================================================================

              William Lam

              VMware vExpert 2009

              VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

              Twitter: @lamw

              vGhetto Script Repository

              Getting Started with the vMA (tips/tricks)

              Getting Started with the vSphere SDK for Perl

              VMware Code Central - Scripts/Sample code for Developers and Administrators

              VMware Developer Community

               

              http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

               

              If you find this information useful, please award points for "correct" or "helpful".

              • 4. Re: Consumed Host Memory vs Active Guest Memory
                skayser Enthusiast

                William already pointed out the definitions of active vs. host memory. Let me add another 2c: what tends to confuse people is a rather high consumed host memory versus a low active guest memory ... usually followed by the question on how exactly active guest memory is calculated. Understanding Memory Resource Management in VMware® ESX™ Server includes some background for both.

                 

                1) Why is consumed host memory usage higher than active guest memory? (p.5)

                 

                "The hypervisor knows when to allocate host physical memory for a virtual machine because the first memory access from the virtual machine to a host physical memory will cause a page fault that can be easily captured by the hypervisor. However, it is difficult for the hypervisor to know when to free host physical memory upon virtual machine memory deallocation because the guest operating system free list is generally not publicly accessible. Hence, the hypervisor cannot easily find out the location of the free list and monitor its changes."

                 

                So the host allocates memory pages upon their first request from the guest (that's why consumed is less than the configured maximum), but doesn't deallocate them once they are freed in the guest OS (because the host simply doesn't see those guest deallocations). If the guest OS re-uses such previously allocated pages, the host won't allocate more host memory. If the guest OS however allocates different pages, the host will also allocate more memory (up to the point where all configured memory pages for the specific guest have been allocated).

                 

                2) How is active guest memory calculated? (p.12)

                 

                "At the beginning of each sampling period, the hypervisor intentionally invalidates several randomly selected guest physical pages and starts to monitor the guest accesses to them. At the end of the sampling period, the fraction of actively used memory can be estimated as the fraction of the invalidated pages that are re-accessed by the guest during the epoch".

                 

                In other words, the active guest memory is calculated from outside the guest by an approximation on the hypervisor level.

                 

                HTH

                 

                Sebastian

                • 5. Re: Consumed Host Memory vs Active Guest Memory
                  maxel Enthusiast

                  http://communities.vmware.com/servlet/JiveServlet/downloadImage/11199/Unbenannt.JPG

                   

                  but how this could be? 204 MB Active

                   

                  but 4 GB consumed?

                   

                   

                   

                   

                   

                   

                   

                  Its a Win2008 R2 System...

                   

                   

                   

                   

                  +However, it is difficult for the hypervisor to know when to free host

                  physical memory upon virtual machine memory deallocation because the

                  guest operating system free list is generally not publicly accessible.

                  Hence, the hypervisor cannot easily find out the location of the free

                  list and monitor its changes."+

                  But with VMware Tools installed.. is'nt there a way to find out the free pages to release them?

                  • 6. Re: Consumed Host Memory vs Active Guest Memory
                    bobalob Novice

                    |     but how this could be? 204 MB Active

                    |

                    |     but 4 GB consumed?

                     

                    My guess on this is that Server 2008 uses all available memory for file cache. If you take a look at memory in resource manager in the guest, you will see that all available RAM is consumed. 204 MB Active comes from recently accessed memory, you probably aren't using the cached sections of memory much on that server, but it's consumed because the host allowed all the memory to be allocated to windows when it first asked for it to use for cache.

                    • 7. Re: Consumed Host Memory vs Active Guest Memory
                      Taz79 Novice

                      So if i understand all this correctly.. I have an additional question to all this..

                       

                      Let say that i have a Host with 32GB RAM

                      4 x guest VM's on the host

                       

                      Can i configure those 4 hosts with 12GB each for example = total 48 GB ram? Would that work?

                      I mean as long as the active memory is not higher than 32GB in total for all guest systems this should be ok?

                       

                      So my real question is can consumed memory be shared between guest VM:s??

                      • 8. Re: Consumed Host Memory vs Active Guest Memory
                        Gopinath Keerthyrajan Expert

                        Taz79 wrote:

                         

                        So if i understand all this correctly.. I have an additional question to all this..

                         

                        Let say that i have a Host with 32GB RAM

                        4 x guest VM's on the host

                         

                        Can i configure those 4 hosts with 12GB each for example = total 48 GB ram? Would that work?

                         

                        defnitly you can overcommit, and it will work. vmware manages by using the memory management methods like TPS, baloonig etc.

                         

                         

                        I mean as long as the active memory is not higher than 32GB in total for all guest systems this should be ok?

                         

                        yes this will be ok... as long as the active memory is below 32, but you need to consider the overhead also. but the extreme over commitment is not recomended in production.

                         

                        So my real question is can consumed memory be shared between guest VM:s??

                         

                        yes it can share.

                        • 9. Re: Consumed Host Memory vs Active Guest Memory
                          Taz79 Novice

                          Thank you for that super fast reply!

                           

                          • 10. Re: Consumed Host Memory vs Active Guest Memory
                            Jimdotcom Lurker

                            Thanks; this response clearly explains the difference between the two metrics.

                            • 11. Re: Consumed Host Memory vs Active Guest Memory
                              maxel Enthusiast

                              Ich bin bis einschließlich 07.2.2014 nicht erreichbar. E-Mails werden in dieser Zeit nicht gelesen.

                               

                              Bei dringenden Problemen wenden Sie sich bitte an den Helpdesk SI (Tel: 061519371555)

                               

                              --

                              Mit freundlichen Gruessen!

                              Axel Mueller

                               

                               

                              +