Tag Archives: VMware

CPU Ready vs CPU Contention

Folks like Daniel in Hong Kong, Sajag in Thailand, and Ramandeep in US have noticed that I shifted my recommendation from CPU Contention to CPU Ready as Performance SLA. The reason is essentially Change Management. Moving from complaint-based operations to SLA-based is a transformation. It’s not something you do in a month. You need to enlighten your boss and your customers. It’s a paradigm shift that can take months.

As a result, CPU Ready is a better start than CPU Contention. Your IaaS business is not ready for Contention, pun intended.

CPU Ready is more stable than CPU Contention, as it’s not affected by Hyper Threading and Power Management.

  • Running both HT on a core reduces the amount of CPU cycle by 50%. Since HT gives only 1.25x boost, each HT gets 62.5% when both are running. That reduction is accounted for in CPU Contention, which is why it can spike to >35% when Ready is not even 1%. Test this by running 2 large VMs in 1 ESXi. If the ESXi is 16 cores 32 treads, then you run 2x 16 vCPU VM. Run both at 100%. Set Power Management to Max so you eliminate frequency scaling from impacting CPU Contention. Both should experience minimal CPU Ready but high CPU Contention. My guess is CPU Ready will be <1%, while CPU Contention will be >35%.
  • Power Management. As you can see here, in general you should take advantage of power savings. The performance degradation is minimal while the savings is substantial. CPU Contention accounts for this frequency drop. My guess is frequency drop of 25% will result in CPU Contention of 25%. I wrote guess as I have not seen a test.

Considering the above, Ready is a lot less volatile. This makes it more suitable as SLA. Operationally, it’s easier to implement. It’s easier to explain to folks less familiar with VMkernel CPU Scheduler.

If you use CPU Contention as formal SLA, you may be spending a lot of time troubleshooting when the business don’t even notice the performance degradation.

Where do you use CPU Contention then?

  • If the value is low, then you don’t need to check CPU Ready, Co-Stop, Power Management and CPU overcommit. The reason is they are all accounted for in CPU Contention.
  • If the value is high (my take is > 37.5%), then follow these steps:
    1. Check CPU Run Queue, CPU Context Switch, “Guest OS CPU Usage“, CPU Ready and CPU Co-Stop. Ensure all the CPU counters are good. If they are all low, then it’s Frequency Scaling and HT. If they are not low, check VM CPU Limit and CPU Share.
    2. Check ESXi power management. If they are set to Maximum correctly, then Frequency Scaling is out (you’re left with HT as the factor), else HT could be at play. A simple solution for apps who are sensitive to frequency scaling is to set power management to max.
    3. Check CPU Overcommit at the time of issue. If there is more vCPU than pCore on that ESXi, then HT could be impacting, else HT not impacting. IMHO, it’s rare that an application does not tolerate HT as it’s transparent to it. While HT reduces the CPU time by 37.5%, a CPU that is 37.5% faster will logically make up for it.

Unfortunately, there is no way to check directly the individual impact of HT and Frequency Scaling. There is no separate counter for each. You can see it indirectly by checking CPU Demand or CPU Usage. If there is a dip at the same CPU Contention went up, but CPU Run does not dip, then it’s HT or Frequency Scaling impacted the VM.

Hope that clarifies. If your observation in production differ to the above, do email me.

A new Adventure!

I’ve joined the Product Management team as a PM. Being a member of a small team (Sunny and a few others), we are given the privilege to plan and drive vR Ops to the next level.

Why did I change job?

As a human being, there are 3 levels of what we do: Job, Career and Calling. Out of 7 billions people, most of us have a job. Those luckier have a career. A few have a calling. IMHO, a calling is when you have a balance among the 3M (Money, Meaning, Merry) of what you do. A calling is not perfect, as it’s a trade off the 3 corner of a triangle. Ideally, the triangle is as small as possible, so you’re close to all 3. To read more, follow this.

Some folks asked how I could get a Product Manager job out of Singapore, since there is no R&D, QA, UX, Tech Marketing, Product Marketing, and Management here.

If you want to know, here is a short story.

This job took me >5 years to vrealize. I’ve been doing vR Ops since 1.0, when it was released back in early 2011. I was one of the first to get trained in Asia Pacific. I remember when David Lavigna trained us in Sydney. I saw how I could apply super metric and custom dashboards to help customers monitor and troubleshoot. Instead of spending a lot of time with vCenter performance tabs, I could simply slice and dice the whole environment.

By 2014, I’d already spent a few years on the product. Customers taught me things they need to monitor or troubleshoot. It’s amazing how much you can learn in production environment vs lab. Real problems, real people. I compiled these lessons learned, gave it a structure, and published my first book on Dec 2014.

In 2014, VMware elected me as a member of the CTO Ambassador program. In my 1+ decade in VMware, this is the best “training” program. It opens door. It gave me trips to Palo Alto and RADIO, where I could develop the relationship with R&D.

Sunny and I brought the material to the world at VMworld 2015. We did 2 sessions, ~600 audience. The feedback told me we’re on the right path. That was the turning point to start packaging the dashboards into an integrated suite.

I continued enhancing the material, and published a second edition of my book in March 2016. Product Management team, who had been super supportive of my work, invited me to Palo Alto, VMware HQ in Silicon Valley. They paid for my first Take 2, and I spent 2 weeks in with R&D team in March 2016.

Kenon took the material and turned it into a program in June 2016. He called it Operationalize Your World. He worked with all the regions in Asia Pacific. Both of us traveled heavily and met many customers and partners. He secured the travel funding and worked with local team to get the event going. I am averaging 150 – 200 days a year since then.

VMworld 2016 was another success. I met even more customers, who convinced me that there is a big market for me to focus on. Post VMworld, Product Management team decided to bring on board part of Operationalize Your World. vRealize Operations 6.4 was the first release where we replaced bulk of existing dashboards. It was released in Nov 2016, and the feedback was very positive. Since then I had been privilege to get involved with the release, giving feedback as basically Customer[0].

By this time, Sunny had moved to Palo Alto. That changed a lot of things for me, and I benefited from that close partnership. In life, Sunny gave me an experience that 1+1=3. Each of us will have a solution, and after some fight, we end up with a 3rd and better solution.

In June 2017, I was given the chance to spend 2 weeks R&D. It gave the chance to meet more developers. Their eagerness to make the products better, and most importantly how they treated me like a member of the family, convinced me that this is where I wanted to focus. Since then, I’ve been back 2 more times, for a total of 4 weeks. All were kindly paid by CMBU. Yes, they really treated me like a member of the team.

In VMworld 2017, Product Marketing got me to speak in both US and Europe events. That was my first time meeting EMEA customers. Glad to know Operationalize Your World was resonating. In fact, it resonated better than US.

I got a chance to participate in 6.5, 6.6 and 6.7 releases. My main focus was on the ability to customise. If you compare 6.7 vs 6.4, you notice it’s easier to work with the widgets. They have better control, and look more pleasing too. You also have a lot less metrics, hence it’s easier to know what to pick. We also added a lot of property.

In March 2018, R&D invited me to do a Take 3. It is a 3 month secondment where I was part of the Product Management team. Upon completion of the Take 3, they helped to work with my CS management to transfer me. I’m grateful for my management, who gave their blessings and did the transfer with my interest at heart.

Throughout all these years, customers and partners feedback are clear: vR Ops and Log Insight are useful to them, and they want to use vRealize even more. At the end of the day, it is this assurance from them that made jump into the PM role. I’m blessed to have met probably a thousand customers since 1.0 in 2011. Collectively, they educate me, using their production environment as real examples. Their feedback shape my thought, and give me clear guidance on where we should take the products.

Large Scale vSAN Monitoring

Large scale VMware vSAN operations raises the need for easier and faster monitoring. With many and large vSAN clusters, monitoring and troubleshooting become more challenging. To illustrate, let’s take a single vSAN cluster with the following setup:

Here are some of the questions you want to ask in day to day operations:

  • Is any of the ESXi running high CPU utilization?
  • Is any of the ESXi running high Memory utilization?
  • Is any of the NIC running high utilization?
    • With 4 NIC per ESXi, you have 40 TX + 40 RX metrics.
  • Is vSAN vmkernel network congested?
  • Is the Read Cache used?
  • Is the Write Buffer sufficient?
  • Is the Cache Tier performing fast?
    • Each disk has 4 metrics: Read Cache Read Latency, Read Cache Write Latency, Write Buffer Write Latency, Write Buffer Read Latency
    • Since there are 20 disks, you need to check 80 counters
  • Is the Capacity Disks performing fast?
    • Check both Read and Write latency.
    • Total 120 x 2 = 240 counters.
  • Is any of the Disk Group running low on space?
  • Is any of the Disk Group facing congestion?
    • You want to check both the max and count the number of occurrence > 60.
  • Is there outstanding IO on any of the Disk Group?

If you add them the above, you are looking at 530 metrics for this vSAN cluster. And that’s just 1 point in time. In 1 month you’re looking at 530 x 8766 = 4.6+ millions data points!

How do you monitor millions of data so you can be proactive?

vRealize Operation 6.7 sports vSAN KPIs. We collapsed each of those questions. So you only have 12 metrics to check instead of 530, without losing any insight. In fact, you get better early warning, as we hide the average. Early Warning is critical as buying hardware is more than a trip to local DIY hardware store.

The KPIs achieve this simplification by using supermetrics:

Using Min, Max, Count, it picks the early warning.

The KPI has been a hit with customers. But it falls short when you have many vSAN clusters. If you have say 25 hybrid clusters and 25 All Flash clusters, you need to check 50 clusters. While you can click 50x, what you want is to see all 50 at the same time.

This means we need to aggregate the metrics further. There should only be 1 and only 1 metric per cluster.

The challenge is the KPI has different units and scale. How do we normalize them into Green, Yellow, Orange and Red?

We do it by defining a normalization table. We need 1 table for All Flash and 1 for Hybrid, as they have different KPI and threshold. Here is the table for All Flash:

I’m including Utilization even though it does not impact performance. ESXi running at 99% is not slower than ESXi running at 1%, so long there is no contention or latency. The reason is convenience, as it’s hard to monitor when there are >1 counter. You need to bring it down to 1 counter.

I’m setting CPU Ready, CPU Co-Stop and RAM Contention at low numbers, so we can catch early warning. You can adjust after you import.

Here is the table for Hybrid. It has Read Cache Hit Rate (%)

Once you have the table, you can map into threshold.

vSAN Performance is the average of all these. We are not taking the worst to prevent 1 value from keeping it red all the time. If you take the worst, the value will likely remain constant. That’s not good, as pattern is important in monitoring. The relative movement can be more important than the absolute value.

You implement the above using super metric. Yup, heaps of them 🙂

Hope you find it useful. I will share how the above is implemented in future post.