• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

scalable shares

vSphere 7 and DRS Scalable Shares, how are they calculated?

Duncan Epping · Mar 16, 2020 ·

I wrote a post and recorded a short demo that explained this cool new feature called Scalable Shares, part of vSphere 7 / DRS, last week. I didn’t want to go too deep in the post, but now that I am getting more questions about how this actually works, I figured I would provide some examples to explain it. As mentioned in my previous post, Scalable Shares solves a problem many have been facing over the last decade or so, which is that DRS does not take the number of VMs in the pool into account when it comes to allocating resources. So as an example:

Just imagine you have a resource pool called “Test”, it is a resource pool with “normal” shares and has 4 VMs. Let’s say this resource pool has 4000 shares.

Now compare that resource pool to the “Production” pool, which has shares set to “high” but has 24 VMs. Let’s say this resource pool has 8000 shares.

This is a very extreme example, but it shows you immediately what the problem is. On a per VM basis, the VMs in the production resource pool, would receive far less resources when there’s contention as DRS would simply divvy up the resources based on the assignment of the shares of the resource pool. Test would receive 1/3 of the resource (4000 of 12000 total shares), and production would receive 2/3 of the resources (8000 of 12000 total shares). If you would divide that by the number of VMs in each pool, it is obvious that the VMs in Test are in a better situation than the VMs in Production.

So how would this work if you Scalable Shares enabled? Well, let’s list some facts first:

  • A resource pool looks like a VM with 4 vCPUs and 16GB of memory to DRS
  • Scalable Shares looks at the total amount of shares in the Resource Pool (all vCPUs!)
  • For a resource pool high is 8000 shares, normal is 4000 shares and low is 2000 shares
    • Note, that this is based on 4 vCPUs, so the real values are 2000, 1000, 500.

The calculation would be as following:

Resource Pool Shares = (4 vCPU * Shares of Pool )* (Total number of shares of all vCPUs in resource pool)

So as an example, in the case I have Test with normal shares and 4 VMs, and Production with high shares and 24 VMs, and all VMs have a single vCPU with normal priority the calculation for those two resource pools would be:

Test = (4 * 1000) * (4 * 1000) = 16,000,000 shares

Production = (4 * 2000) * (24 * 1000) = 192,000,000 shares

In other words, Production has 12 times more the number of shares as Test has when Scalable Shares is enabled. I hope that clears things up!

Introducing Scalable Shares – vSphere 7

Duncan Epping · Mar 12, 2020 ·

Early 2015 Frank Denneman and I had a discussion during a flight to San Francisco. We came up with this concept for Resource Pools where the number of shares would be determined by the number of VMs and the priority of the pool. In other words, we wanted to avoid the dilution of shares in an environment with resource pools and basically solve the resource pool pie paradox problem described here. We worked with the DRS team on describing the concept, we filed a patent for it and got the patent granted in 2019. Today I am happy to share that the feature made it into a release and will be part of vSphere 7.0.

Scalable Shares is a feature that is part of DRS. You either enable it on the Cluster or you enable it on the Resource Pool. Personally I would always enable it on the Resource Pool level. So how does it work? Well normally when you create a resource pool with High Priority and one with Normal Priority, the RP with Priority High will have 8000 shares and the RP with Priority Normal will get 4000 shares. In other words, a 2:1 ratio between High and Normal. Now if you have 8 VMs in High and 1 in Normal, you can imagine that this single VM in Normal will get more resources than the 8 in High when there is contention simply as the 8 share the resources of the pool while the single VM doesn’t share the resources.

When Scalable Shares is enabled, DRS does a calculation using the ratio (4:2:1 – High:Normal:Low) and the number of VMs. In other words, 8 VMs with a 1000 shares in High would be *4, and 1 VM with a 1000 shares in Normal would be *2. The result being:

  • Normal = (1*1000)*2=2000
  • High = (8*1000)*4=32000

I hope that makes a bit sense? It took me a while to fully grasp. If you are wondering what this looks like in the product, and what the impact could/would be when you switch from “traditional” to “scalable shares”, I created a demo that shows this below.

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

May 24th – VMUG Poland
June 1st – VMUG Belgium
Aug 21st – VMware Explore
Sep 20th – VMUG DK
Nov 6th – VMware Explore
Dec 7th – Swiss German VMUG

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in