vSphere High Performance Cookbook - Second Edition
eBook - ePub

vSphere High Performance Cookbook - Second Edition

  1. 318 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

vSphere High Performance Cookbook - Second Edition

About this book

Over 80 recipes to help you improve vSphere 6.5's performance and solve problems before they ariseAbout This Book• 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 tuningWho This Book Is ForIf 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 VASAIn DetailvSphere 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.Style and approachThis cookbook is written in a practical, helpful style with numerous recipes focusing on answering and providing solutions to common and not-so-common performance issues and problems.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access vSphere High Performance Cookbook - Second Edition by Kevin Elder, Christopher Kusek, Prasenjit Sarkar in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Aplicaciones empresariales. We have over one million books available in our catalogue for you to explore.

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 techniques:
  • Transparent Page Sharing (TPS)
  • Memory ballooning
  • Host-level (or hypervisor) swapping

Getting ready

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

How to do it…

Most likely, you don't need to do anything to enable , as it is enabled by default on your ESXi hypervisor.
Memory ballooning is driven by the VMware Tools software, so you'll need it installed on all your VMs. It will load the vmmemctl driver, which is responsible for memory ballooning.
Perform the following steps if VMware Tools is not installed or is out of date:
  1. Log in to VMware vSphere Web Client.
  2. In the VM inventory, right-click on the VM, select Guest OS, then click on Install VMware Tools or Upgrade VMware Tools.
  3. Go to the VM Console and follow the onscreen instructions to install or upgrade it.
Similarly, host-level or hypervisor swapping is enabled by default. You don't need to perform any additional steps to enable it.

How it works…

Let's look at how these techniques work.

TPS

When there are multiple VMs running on the same hypervisor, most of the time some of them might have identical sets of memory content (known as memory pages). This creates opportunities for sharing memory across VMs. The ESXi hypervisor can reclaim redundant copies and keep only one copy using TPS. You can think of it as Memory Deduplication.
Traditionally, in x86 systems, memory is split into 4 kilobytes of pages, and that happens only if you are using small pages with shadow page tables. The TPS process runs every 60 minutes. It scans all the memory pages and calculates a hash value for each one of them. These hashes are saved in a separate table and compared to each other by the kernel. Every time the ESXi kernel finds two identical hashes, it starts a bit-by-bit comparison of the corresponding memory pages. If these pages are absolutely the same, the kernel leaves only one copy of the page in memory and removes the second one. When one of your VM requests to write to this page, the kernel creates a new page because the change made by one VM must not affect the memory contents of another VM.
VMware ESXi scans the guest physical pages randomly, with a base scan rate specified by Mem.ShareScanTime. The maximum number of scanned pages per second in the host and the maximum number of per-VM-scanned pages (that is, Mem.ShareScanGHz and Mem.ShareRateMax, respectively) can also be specified in ESXi's advanced settings.

Memory ballooning

Memory ballooning tells the guest operating system that it does not have enough memory from the host so that the guest operating system could free some of its memory. When there is a memory crisis, the hypervisor tells the balloon driver to request some number of megabytes from the guest operating system. The hypervisor knows that pages occupied by the balloon driver will never store data, so the pages of pRAM requested by the balloon driver can then be reallocated safely to other VMs. It is the guest operating system's call to decide which pages of vRAM it should allocate to the balloon driver, and it will start with free pages. If it has plenty of free or idle guest physical memory, inflating the balloon will induce no guest-level paging and thus it will not affect guest performance. However, in the case of memory contention within the guest, the VM OS decides which guest physical pages are to be paged out to the virtual swap device in order to satisfy the balloon driver's allocation requests.
The balloon driv...

Table of contents

  1. Title Page
  2. Copyright
  3. Credits
  4. About the Authors
  5. About the Reviewer
  6. www.PacktPub.com
  7. Customer Feedback
  8. Preface
  9. CPU Performance Design
  10. Memory Performance Design
  11. Networking Performance Design
  12. DRS, SDRS, and Resource Control Design
  13. vSphere Cluster Design
  14. Storage Performance Design
  15. Designing vCenter on Windows for Best Performance
  16. Designing VCSA for Best Performance
  17. Virtual Machine and Virtual Environment Performance Design
  18. Performance Tools