Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
vSphere High Performance Cookbook - Second Edition
vSphere High Performance Cookbook - Second Edition

vSphere High Performance Cookbook - Second Edition: Recipes to tune your vSphere for maximum performance , Second Edition

Arrow left icon
Profile Icon Christopher Kusek Profile Icon Elder Profile Icon Prasenjit Sarkar
Arrow right icon
S$41.98 S$59.99
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2 (1 Ratings)
eBook Jun 2017 338 pages 2nd Edition
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
Arrow left icon
Profile Icon Christopher Kusek Profile Icon Elder Profile Icon Prasenjit Sarkar
Arrow right icon
S$41.98 S$59.99
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2 (1 Ratings)
eBook Jun 2017 338 pages 2nd Edition
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial
eBook
S$41.98 S$59.99
Paperback
S$74.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

vSphere High Performance Cookbook - Second Edition

Memory Performance Design

In this chapter, we will cover the tasks related to memory performance design. You will learn the following aspects of memory performance design:

  • Virtual memory reclamation techniques
  • Monitoring a host-swapping activity
  • Monitoring a host-ballooning activity
  • Keeping memory free for VMkernel
  • Key memory performance counters to monitor
  • What counters not to use
  • Identifying when memory is the problem
  • Analyzing host and VM memory
  • Memory performance best practices

Introduction

Although VMware vSphere uses various mechanisms to efficiently allocate memory, you might still encounter a situation where VMs are allocated with insufficient physical memory.

You should know how to monitor memory usage of both host machines and VMs. You should also know how to troubleshoot common memory performance problems, such as those involving a demand for memory.

Virtual memory reclamation techniques

VMs perform memory allocation in the same way an operating system handles memory allocation and deallocation. The guest operating system frees a piece of physical memory by adding memory page numbers to the guest free list.

The guest operating system's free list is not accessible to the hypervisor; thus, it is difficult for the hypervisor to know when to free the host physical memory and when the guest physical memory needs to be freed. The hypervisor is completely unaware of which pages are free or allocated to the guest operating system, and because of this, it cannot reclaim the host physical memory when the guest operating system frees guest physical memory.

So the VMware hypervisor relies on memory reclamation techniques to reclaim the host physical memory that is freed by the guest operating system. These are the memory reclamation...

Monitoring a host-swapping activity

Excessive memory demand can cause severe performance problems for one or more VMs on an ESXi host. When ESXi is actively swapping from the memory of a VM to disk, the performance of that VM will degrade. The overhead of swapping a VM's memory to a disk can also degrade the performance of other VMs because the VM expects to be writing to RAM (speeds measured in nanoseconds), but it is unknowingly writing to disk (speeds measured in milliseconds).

The counters in vSphere Client for monitoring the swapping activity are as follows:

  • Memory Swap In Rate: The rate at which memory is being swapped in from the disk.
  • Memory Swap Out Rate: The rate at which memory is being swapped out to the disk.
  • Swapped: The total amount of data that is sitting inside the .vswp hypervisor-level swap file. However, this doesn't tell you anything about the current...

Monitoring a host-ballooning activity

Ballooning is part of normal operations when memory is overcommitted. The occurrence of ballooning is not necessarily an indication of a resource-deficient infrastructure. The use of the balloon driver enables the guest to give up physical memory pages that are not being used. In fact, ballooning can be a sign that you're getting extra value out of the memory you have in the host.

However, if ballooning causes the guest to give up memory that it actually needs, performance problems can occur due to guest operating system paging.

Note, however, that this is fairly uncommon because the guest operating system will always assign memory that is already free to the balloon driver whenever possible, thereby avoiding any guest operating system swapping.

In vSphere Web Client, use the Memory Balloon counter to monitor a host's ballooning...

Keeping memory free for VMkernel

The amount of memory VMkernel will try to keep free can be set through the Mem.MemMinFreePct parameter. MemMinFreePct determines the amount of memory that VMkernel should keep free. vSphere 4.1 introduced a dynamic threshold for the Soft, Hard, and Low states to set appropriate thresholds and prevent VM performance issues while protecting VMkernel. The different states, based on %pRAM, which is still free, determines what type of memory reclamation techniques would be used.

For MemMinFreePct, using a default value of 6 percent can be inefficient when 256 gigabytes, 512 gigabytes, or even 1 TB hosts are becoming more mainstream. Having a 6 percent threshold on 512 gigabytes results in 30 gigabytes idling most of the time. However, not all customers use large systems; some prefer to scale out rather than scale up. If you choose to scale out and have...

Key memory performance counters to monitor

To troubleshoot memory performance in a VMware vSphere environment, you should monitor the memory performance very carefully. In this aspect, you should monitor the following counters:

  • Average memory active: The memory estimated to be used, based on recently touched memory pages.
  • Average memory swapped in or out: Virtual memory swapped to or from disk.
  • Average memory swapped: Total amount of memory swapped out. This indicates a possibility (with an unknown likelihood) of poor performance in future.

Getting ready

To step through this recipe, you will need a running ESXi Server, a couple of running VMs with VMware Tools installed, and vSphere Web Client. No other prerequisites are...

What counters not to use

A lot of the time, we assume that some very popular counters would be better to monitor memory performance. However, many times, it leads to something else. This means that these are not an indication of a memory performance issue. If this counter is combined with something else, then it may indicate performance degradation.

In this aspect, don't use two of the most popular counters just to understand whether the memory is under pressure or not:

  • Mem.consumed (Consumed Memory)
  • Mem.vmmemctl (ballooned memory)

Let me show you what they essentially indicate.

The Mem.consumed counter is the amount of memory consumed by one or all VMs. This is calculated as memory granted minus memory saved by sharing. Now the question is why we should not use this. The reason is that memory allocation will vary dynamically based on the VM's entitlement. It is important...

Introduction


Although VMware vSphere uses various mechanisms to efficiently allocate memory, you might still encounter a situation where VMs are allocated with insufficient physical memory.

You should know how to monitor memory usage of both host machines and VMs. You should also know how to troubleshoot common memory performance problems, such as those involving a demand for memory.

Virtual memory reclamation techniques


VMs perform memory allocation in the same way an operating system handles memory allocation and deallocation. The guest operating system frees a piece of physical memory by adding memory page numbers to the guest free list.

The guest operating system's free list is not accessible to the hypervisor; thus, it is difficult for the hypervisor to know when to free the host physical memory and when the guest physical memory needs to be freed. The hypervisor is completely unaware of which pages are free or allocated to the guest operating system, and because of this, it cannot reclaim the host physical memory when the guest operating system frees guest physical memory.

So the VMware hypervisor relies on memory reclamation techniques to reclaim the host physical memory that is freed by the guest operating system. These are the memory reclamation techniques:

  • Transparent Page Sharing (TPS)
  • Memory ballooning
  • Host-level (or hypervisor) swapping

Getting ready

To step through...

Monitoring a host-swapping activity


Excessive memory demand can cause severe performance problems for one or more VMs on an ESXi host. When ESXi is actively swapping from the memory of a VM to disk, the performance of that VM will degrade. The overhead of swapping a VM's memory to a disk can also degrade the performance of other VMs because the VM expects to be writing to RAM (speeds measured in nanoseconds), but it is unknowingly writing to disk (speeds measured in milliseconds).

The counters in vSphere Client for monitoring the swapping activity are as follows:

  • Memory Swap In Rate: The rate at which memory is being swapped in from the disk.
  • Memory Swap Out Rate: The rate at which memory is being swapped out to the disk.
  • Swapped: The total amount of data that is sitting inside the .vswp hypervisor-level swap file. However, this doesn't tell you anything about the current state of the performance, nor about the current state of free pRAM. It just tells you that at some point in the past, there...

Monitoring a host-ballooning activity


Ballooning is part of normal operations when memory is overcommitted. The occurrence of ballooning is not necessarily an indication of a resource-deficient infrastructure. The use of the balloon driver enables the guest to give up physical memory pages that are not being used. In fact, ballooning can be a sign that you're getting extra value out of the memory you have in the host.

However, if ballooning causes the guest to give up memory that it actually needs, performance problems can occur due to guest operating system paging.

Note

Note, however, that this is fairly uncommon because the guest operating system will always assign memory that is already free to the balloon driver whenever possible, thereby avoiding any guest operating system swapping.

In vSphere Web Client, use the Memory Balloon counter to monitor a host's ballooning activity. This counter represents the total amount of memory claimed by the balloon drivers of the VMs on the host. The memory...

Keeping memory free for VMkernel


The amount of memory VMkernel will try to keep free can be set through the Mem.MemMinFreePct parameter. MemMinFreePct determines the amount of memory that VMkernel should keep free. vSphere 4.1 introduced a dynamic threshold for the Soft, Hard, and Low states to set appropriate thresholds and prevent VM performance issues while protecting VMkernel. The different states, based on %pRAM, which is still free, determines what type of memory reclamation techniques would be used.

For MemMinFreePct, using a default value of 6 percent can be inefficient when 256 gigabytes, 512 gigabytes, or even 1 TB hosts are becoming more mainstream. Having a 6 percent threshold on 512 gigabytes results in 30 gigabytes idling most of the time. However, not all customers use large systems; some prefer to scale out rather than scale up. If you choose to scale out and have more servers with less RAM in each system, a 6 percent MemMinFreePct threshold might be suitable. To have the...

Key memory performance counters to monitor


To troubleshoot memory performance in a VMware vSphere environment, you should monitor the memory performance very carefully. In this aspect, you should monitor the following counters:

  • Average memory active: The memory estimated to be used, based on recently touched memory pages.
  • Average memory swapped in or out: Virtual memory swapped to or from disk.
  • Average memory swapped: Total amount of memory swapped out. This indicates a possibility (with an unknown likelihood) of poor performance in future.

Getting ready

To step through this recipe, you will need a running ESXi Server, a couple of running VMs with VMware Tools installed, and vSphere Web Client. No other prerequisites are required.

How to do it...

To spot the average Active Memory, you should check both the VM level and host level. To monitor at the VM level, perform the following steps:

  1. Open up vSphere Web Client.
  2. Log in to your vCenter Server.
  3. On the Home screen, select VMs and Templates.
  4. Choose the...

What counters not to use


A lot of the time, we assume that some very popular counters would be better to monitor memory performance. However, many times, it leads to something else. This means that these are not an indication of a memory performance issue. If this counter is combined with something else, then it may indicate performance degradation.

In this aspect, don't use two of the most popular counters just to understand whether the memory is under pressure or not:

  • Mem.consumed (Consumed Memory)
  • Mem.vmmemctl (ballooned memory)

Let me show you what they essentially indicate.

The Mem.consumed counter is the amount of memory consumed by one or all VMs. This is calculated as memory granted minus memory saved by sharing. Now the question is why we should not use this. The reason is that memory allocation will vary dynamically based on the VM's entitlement. It is important that a VM should get whatever it actually demands.

Similarly, Mem.vmmemctl is the amount of ballooned memory. This does not...

Identifying when memory is the problem


Both your host memory and VM memory can indicate that they are under pressure. But the main challenge to a VMware admin is how to determine that there is a memory performance issue.

There are a few things that a VMware admin should understand to confirm whether there is a memory performance issue, and they are:

  • Your host memory consumption is approaching your total host memory
  • Active Memory in your host is approaching your total memory
  • Ballooning is occurring
  • Host swapping is occurring

Now if you wonder what is the Active Memory here in relation to Consumed Memory, let me tell you that Active Memory is the amount of memory that is actively used, as estimated by VMkernel, based on recently touched memory pages. For a VM, this is referred to the amount of guest physical memory that is actively used.

The ESXi host calculates Active Memory using the sum of all the active counters for all the powered-on VMs plus vSphere services on the host.

There could be another...

Analyzing host and VM memory


Often, you need to monitor VM and host memory usage; the good part about this is that VMware vSphere Client exposes two memory statistics in the Summary tab of a VM. These are Consumed Host Memory and Active Guest Memory.

Consumed Host Memory is the amount of host physical memory that is allocated to the VM. Please note that this value includes virtualization overhead as well.

Note

Note that many VMs have oversized vRAM, and the guest operating system is likely to opportunistically fill up its vRAM with unnecessary things (for example, caching everything read from the disk, no matter how unlikely it will be requested again). Consumed Memory only means that the VM used this memory at some point, not that it's likely to use it again.

Active Guest Memory is defined as the amount of guest physical memory that is currently being used by the guest operating system and its applications.

These two statistics are quite useful for analyzing the memory status of the VM and providing...

Memory performance best practices


Virtualization causes an increase in the amount of physical memory required due to the extra memory needed by ESXi for its own code and data structures, and you need to know what are the best practice standards you have.

There are four basic principles that you should keep in mind:

  • Allocate enough memory to hold the working set of applications that you will run on the VM, thus minimizing swapping. You can estimate the working set by monitoring the Active Memory counter.
  • Do not disable the balloon driver.
  • Keep TPS enabled. It's free!
  • Avoid overcommitting memory to the point that it results in heavy memory reclamation, especially complicated Swap In rates (KBps).

How to do it...

So you may ask how can we determine the total required data center memory?

Well, there are several methods to determine the total memory capacity requirement:

  • Use the information gathered during the current state analysis to determine the current memory capacity requirements
  • Use application...

Introduction


Although VMware vSphere uses various mechanisms to efficiently allocate memory, you might still encounter a situation where VMs are allocated with insufficient physical memory.

You should know how to monitor memory usage of both host machines and VMs. You should also know how to troubleshoot common memory performance problems, such as those involving a demand for memory.

Virtual memory reclamation techniques


VMs perform memory allocation in the same way an operating system handles memory allocation and deallocation. The guest operating system frees a piece of physical memory by adding memory page numbers to the guest free list.

The guest operating system's free list is not accessible to the hypervisor; thus, it is difficult for the hypervisor to know when to free the host physical memory and when the guest physical memory needs to be freed. The hypervisor is completely unaware of which pages are free or allocated to the guest operating system, and because of this, it cannot reclaim the host physical memory when the guest operating system frees guest physical memory.

So the VMware hypervisor relies on memory reclamation techniques to reclaim the host physical memory that is freed by the guest operating system. These are the memory reclamation techniques:

  • Transparent Page Sharing (TPS)
  • Memory ballooning
  • Host-level (or hypervisor) swapping

Getting ready

To step through...

Monitoring a host-swapping activity


Excessive memory demand can cause severe performance problems for one or more VMs on an ESXi host. When ESXi is actively swapping from the memory of a VM to disk, the performance of that VM will degrade. The overhead of swapping a VM's memory to a disk can also degrade the performance of other VMs because the VM expects to be writing to RAM (speeds measured in nanoseconds), but it is unknowingly writing to disk (speeds measured in milliseconds).

The counters in vSphere Client for monitoring the swapping activity are as follows:

  • Memory Swap In Rate: The rate at which memory is being swapped in from the disk.
  • Memory Swap Out Rate: The rate at which memory is being swapped out to the disk.
  • Swapped: The total amount of data that is sitting inside the .vswp hypervisor-level swap file. However, this doesn't tell you anything about the current state of the performance, nor about the current state of free pRAM. It just tells you that at some point in the past, there...
Left arrow icon Right arrow icon

Key benefits

  • The practical recipes provide cost-effective and high performance for any application running in a virtual machine
  • Contains best practices and troubleshooting techniques to resolve vSphere 6.5 performance issues
  • Get a comprehensive coverage of performance issues and solutions including vCenter Server design and virtual machine and application tuning

Description

vSphere is a mission-critical piece of software for many businesses. It is a complex tool, and incorrect design and deployment can create performance related issues that can negatively affect the business. This book is focused on solving these problems as well as providing best practices and performance-enhancing techniques. This edition is fully updated to include all the new features in version 6.5 as well as the latest tools and techniques to keep vSphere performing at its best. This book starts with interesting recipes, such as the interaction of vSphere 6.5 components with physical layers such as CPU, memory, and networking. Then we focus on DRS, resource control design, and vSphere cluster design. Next, you’ll learn about storage performance design and how it works with VMware vSphere 6.5. Moving on, you will learn about the two types of vCenter installation and the benefits of each. Lastly, the book covers performance tools that help you get the most out of your vSphere installation. By the end of this book, you will be able to identify, diagnose, and troubleshoot operational faults and critical performance issues in vSphere 6.5.

Who is this book for?

If you are a system administrator and are planning to deploy vSphere 6.5 in your organization and want to maximize its performance, then this book is for you. Prior knowledge of the vSphere 6.5 concepts is essential.

What you will learn

  • • Understand the VMM Scheduler, cache aware CPU Scheduler, NUMA aware CPU Scheduler, and more during the CPU Performance Design phase
  • • Get to know the virtual memory reclamation technique, host ballooning monitoring, and swapping activity
  • • Choose the right platform while designing your vCenter Server, redundant vCenter design, and vCenter SSO and its deployment
  • • Learn how to use various performance simulation tools
  • • Design VCSA Server Certificates to minimize security threats
  • • Use health check tools for storage and boost vSphere 6.5's performance with VAAI and VASA

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2017
Length: 338 pages
Edition : 2nd
Language : English
ISBN-13 : 9781786463296
Vendor :
VMware
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Jun 30, 2017
Length: 338 pages
Edition : 2nd
Language : English
ISBN-13 : 9781786463296
Vendor :
VMware
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 224.97
Mastering VMware vSphere 6.5
S$74.99
vSphere High Performance Cookbook - Second Edition
S$74.99
Learning PowerCLI
S$74.99
Total S$ 224.97 Stars icon

Table of Contents

10 Chapters
CPU Performance Design Chevron down icon Chevron up icon
Memory Performance Design Chevron down icon Chevron up icon
Networking Performance Design Chevron down icon Chevron up icon
DRS, SDRS, and Resource Control Design Chevron down icon Chevron up icon
vSphere Cluster Design Chevron down icon Chevron up icon
Storage Performance Design Chevron down icon Chevron up icon
Designing vCenter on Windows for Best Performance Chevron down icon Chevron up icon
Designing VCSA for Best Performance Chevron down icon Chevron up icon
Virtual Machine and Virtual Environment Performance Design Chevron down icon Chevron up icon
Performance Tools Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
(1 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 100%
1 star 0%
Basavaraj R Navalgund Oct 22, 2017
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
index is very good. i can say OK. and inside it is black and while even though price is high for this book,
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.