WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / How much Virtual Machine memory is using NVMe Tiering?

How much Virtual Machine memory is using NVMe Tiering?

09.23.2024 by William Lam // 4 Comments

I know many in the VMware Community have upgraded to vSphere 8.0 Update 3 to play with the exciting new NVMe Tiering feature, especially for testing various workloads including deploying VMware Cloud Foundation (VCF) for homelab or testing purposes.

A question that has come up a few times now is how do I check the amount of VM memory that has been offloaded to Tier 1 memory (NVMe Tiering) versus using Tier 0 memory (DRAM)?

Today, you can get this information on a specific ESXi host by using the the memstats utility which now has a new report type called vmtier-stats.


Note: In the future, when NVMe Tiering goes out of Tech Preview into generally available (GA), there will be a centralized method for getting this information and going to individual ESXi hosts will not be required.

There are a number of different metrics provided by the vmtier-stats report, but the ones that will be of interests are the following:

name Virtual Machine Cartel ID
memSize VM configured memory
active Active guest memory
tier0Consumed Total memory consumed in Tier 0 (DRAM)
tier1Consumed Total memory consumed in Tier 1 (NVMe Tiering)

One thing you may notice is that memstats uses the VM Cartel ID (e.g. vm.XXXXX) to identify a particular VM, which is not very user friendly. With that said, we can retrieve the VM Cartel ID to VM name by using ESXCLI and then saving that output to a temporarily file, so we can augment the memstats output for ease of consumption.

Step 1 - Run the following command which will output VM Cartel ID to VM name mapping for all current running VMs to a file stored in /tmp/vms

esxcli --formatter csv vm process list | awk -F ',' '{print $2,$5}' > /tmp/vms


Step 2 - Run the following command to retrieve the vmtier-stats and using our VM name mapping file (/tmp/vms), we can replace the VM Cartel ID with the friendly VM name in the output:

memstats -r vmtier-stats -u mb -s name:memSize:active:tier0Consumed:tier1Consumed | sed "$(while read -r name id; do echo "s/vm.$id/$name/g"; done < /tmp/vms)"


From the screenshot above, I have 7 VMs running (VMware Cloud Foundation) on a single ESXi with 96GB of DRAM and NVMe Tiering enabled using 400% ratio. There is ~403GB of configured memory, ~25GB of active memory, ~42GB of consumed DRAM (Tier 0) and ~50GB of memory using NVMe Tiering (Tier 1). What is interesting is that while VCF requires 384GB of memory for deployment, less than half of the physical DRAM is actually being consumed, the overall end user experience is not really impacted based on my experience.

More from my site

  • Sharing a single NVMe device with NVMe Tiering? 
  • Useful NVMe Tiering reporting using vSphere 8.0 Update 3 APIs
  • Quick Tip - NVMe Tiering configured but not working?
  • New ESXi-Arm Fling based on 8.0 Update 3b
  • NVMe Tiering in vSphere 8.0 Update 3 is a Homelab game changer!

Categories // Automation, ESXi, vSphere 8.0 Tags // ESXi 8.0 Update 3, memstats, NVMe

Comments

  1. *protectedDale Hassinger says

    09/23/2024 at 8:12 pm

    Great Blog. I used your commands with a PowerShell Script to get the results.

    Name MemSizeMB ActiveMB Tier0Consumed Tier1Consumed
    --------------------------------------------------------------
    VCSA8x 16384 3209 14212 7
    VAO 20480 2564 13090 21
    CP-01 8192 1610 6563 13
    vIDM 8192 1445 5870 5
    DC-02 2048 206 1986 8
    POWERSST 2048 206 1898 38

    Results look better when you run the script.

    Here is a link to the PS script I used in my GitHub Repository:
    https://bit.ly/3MWcxT1

    Reply
  2. *protectedRasool SB says

    09/24/2024 at 12:17 am

    You are Great! Love your articles, so much of stuff, knowledge will get to learn, very very helpful, Thank you so very much for awesomeness

    Reply
  3. *protectedVince says

    09/27/2024 at 6:22 am

    What happens when the NVMe drive in the host fails?

    Reply
  4. *protectedJason Wong says

    09/30/2024 at 12:38 am

    Here is a link to my python script to do the same thing remotely. 🙂

    https://github.com/jsconsultancy/tier-mem

    Reply

Leave a Reply to Rasool SBCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...