1 / 70

Resource Monitoring

Resource Monitoring. Module 9. You Are Here. vSphere Environment. Operations. Introduction to VMware Virtualization. Access Control. VMware ESX and ESXi. Resource Monitoring. VMware vCenter Server. Data Protection. Networking. Scalability. Storage. High Availability.

palila
Download Presentation

Resource Monitoring

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Resource Monitoring Module 9

  2. You Are Here vSphere Environment Operations Introduction to VMware Virtualization Access Control VMware ESX and ESXi Resource Monitoring VMware vCenter Server Data Protection Networking Scalability Storage High Availability Virtual Machines Patch Management Installing VMware ESX and ESXi VMware vSphere 4.1: Install, Configure, Manage – Revision A

  3. Importance • Although the VMkernel works proactively to avoid resource contention, maximizing performance requires both analysis and ongoing monitoring. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  4. Module Lessons • Lesson 1: Resource Controls and Resource Pools • Lesson 2: Virtual CPU and Memory Concepts • Lesson 3: Monitoring Resource Usage • Lesson 4: Using Alarms VMware vSphere 4.1: Install, Configure, Manage – Revision A

  5. Lesson 1:Resource Controls and Resource Pools VMware vSphere 4.1: Install, Configure, Manage – Revision A

  6. Lesson Objectives • Describe resource allocation settings for: • CPU • Memory • Storage I/O • Create a resource pool VMware vSphere 4.1: Install, Configure, Manage – Revision A

  7. Systems for Optimizing Virtual Machine Resource Use VMware vSphere 4.1: Install, Configure, Manage – Revision A

  8. Resource Management Resource management is the allocation of resources from providers (hosts, clusters, and resource pools) to consumers (virtual machines). • Resources include CPU, memory, storage, and network. Resource management: • Resolves resource overcommitment • Prevents virtual machines from monopolizing resources • Exploits undercommitted resources • Controls the relative importance of virtual machines Resource allocation settings: • CPU and memory is controlled by using shares, limits, and reservations. • Storage I/O is controlled by using shares and limits. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  9. Virtual Machine CPU Resource Settings Limit (MHz): • A cap on the consumption of CPU time by this virtual machine Reservation (MHz): • A certain number of CPU cycles reserved for this virtual machine Shares: • A value that specifies the relative priority or importance of a virtual machine VMware vSphere 4.1: Install, Configure, Manage – Revision A

  10. How Virtual Machines Compete for Resources Proportional-share system for relative resource management: • Applied during resource contention • Prevents virtual machines from monopolizing resources • Guarantees predictable resource shares Number of shares Change number of shares. Power on VM. Power off VM. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  11. Virtual Machine Memory Resource Settings Available memory: • Memory size defined when the virtual machine was created Limit (MB): • A cap on the consumption of physical memory by this virtual machine Reservation (MB): • A certain amount of physical memory reserved for this virtual machine Shares: • A value that specifies the relative priority or importance of a virtual machine A virtual machine swap file covers the range between available memory and reservation. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  12. Virtual Machine Storage I/O Resource Settings Storage I/O Control resource settings: • Limit (IOPs): • Cap on the storage I/O bandwidth for the virtual machine • Shares: • A value that shows relative importance of a virtual machine Storage I/O Control: • Must be enabled on the datastore • Has several requirements Example 1: Two VMs running Iometer(VM1:1,000 shares, VM2: 2,000 shares) Without shares/limits With shares/limits VMware vSphere 4.1: Install, Configure, Manage – Revision A

  13. What Is a Resource Pool? A resource pool is a logical abstraction for hierarchically managing CPU and memory resources. It is used on standalone hosts or clusters enabled for VMware Distributed Resource Scheduler. It provides resources for virtual machines and child pools. rootresource pool resource pools VMware vSphere 4.1: Install, Configure, Manage – Revision A

  14. Why Use Resource Pools? Using resource pools can result in these benefits: • Flexible hierarchical organization • Isolation between pools and sharing within pools • Access control and delegation • Separation of resources from hardware • Management of sets of virtual machines running a multitier service VMware vSphere 4.1: Install, Configure, Manage – Revision A

  15. Resource Pool Attributes Resource pool attributes: • Shares: • Low, Normal, High, Custom • Reservations, in MHz and MB • Limits, in MHz and MB: • Unlimited access, by default (up to maximum amount of resource accessible) • Expandable reservation? • Yes – Virtual machines and subpools can draw from this pool’s parent. • No – Virtual machines and subpools can draw only from this pool, even if its parent has free resources. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  16. Resource Pool Scenario Company X’s IT department has two internal customers: • The finance department supplies two-thirds of the budget. • The engineering department supplies one-third of the budget. Each internal customer has both production and test/dev virtual machines. We must cap the resource consumption of the test/dev virtual machines. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  17. Resource Pool Example VMware vSphere 4.1: Install, Configure, Manage – Revision A

  18. Resource Pools Example: CPU Shares VMware vSphere 4.1: Install, Configure, Manage – Revision A

  19. Resource Pools Example: CPU Contention VMware vSphere 4.1: Install, Configure, Manage – Revision A

  20. Root resource pool Retail pool total CPU: 10,200MHz total memory: 3,000MB Expandable Reservation Borrowing resources occurs recursively from the ancestors of the current resource pool. • Expandable Reservation option must be enabled. • This option offers more flexibility but less protection. Expanded reservations are not released until the virtual machine that caused the expansion is shut down or its reservation is reduced. reservation: 3,000MHz expandable reservation: Yes eCommerce Web pool eCommerce Apps pool reservation:1,000MHz expandable? No reservation: 1,200MHz expandable? Yes An expandable reservation might allow a rogueapplication to claim all unreserved capacity. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  21. Root resource pool Total CPU: 10,200MHz Total memory: 3,000 MB VM1 R=400 VM2 R=300 VM3 R=500 Example of Expandable Reservation (1) eCommerce resource pools reserve 2,200MHz of the 3,000MHz that the Retail pool has reserved. Power on virtual machines in the eCommerce Web pool. With Expandable Reservation disabled on the eCommerce Web pool, VM3 cannot be started with a reservation of 500MHz. • Lower the virtual machine reservation. • Enable Expandable Reservation. • Increase the eCommerce Web pool’s reservation. Retail pool reservation: 3,000MHz expandable reservation: No eCommerce Web pool eCommerce Apps pool reservation:1,000MHz expandable? No reservation: 1,200MHz expandable? Yes VMware vSphere 4.1: Install, Configure, Manage – Revision A

  22. Root resource pool Total CPU: 10,000MHzTotal memory: 3,000MB Retail pool VM4 R=500 VM3 R=500 VM2 R=300 VM5 R=500 VM1 R=400 VM7 R=500 VM6 R=500 Example of Expandable Reservation (2) Enable Expandable Reservation on the eCommerce Web pool. The system considers the resources available in the child resource pool and its direct parent resource pool. The virtual machine’s reservation is charged against the reservation for eCommerce Web. eCommerce Web’s reservation is charged against the reservation for Retail. **200MHz used by Retail** reservation: 3,000MHzexpandable reservation: Yes **full reservation used** eCommerce Web pool eCommerce Apps pool reservation:1,000MHz expandable? Yes reservation: 1,200MHz expandable? Yes VMware vSphere 4.1: Install, Configure, Manage – Revision A

  23. Admission Control for CPU and Memory Reservations Power on a virtual machine. Create a new subpoolwith its own reservation. Increase a pool’sreservation. Can this poolsatisfy reservation? Succeed Yes No Expandablereservation? No Fail Yes – Go to parent pool. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  24. Resource Pool Summary Tab Click the resource pool’s Summary tab in the Hosts and Clusters inventory view. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  25. Resource Allocation Tab Click the resource pool’s Resource Allocation tab. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  26. Schedule a task to change the resource settings of a resource pool or a virtual machine. Scheduling Changes to Resource Settings VMware vSphere 4.1: Install, Configure, Manage – Revision A

  27. Lab 14 • In this lab, you will create and use resource pools on an ESXi host. • Create a resource pool. • Verify resource pool functionality. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  28. Lesson Summary • Describe resource allocation settings for: • CPU • Memory • Storage I/O • Create a resource pool VMware vSphere 4.1: Install, Configure, Manage – Revision A

  29. Lesson 2:Virtual CPU and Memory Concepts VMware vSphere 4.1: Install, Configure, Manage – Revision A

  30. Lesson Objectives • Identify the methods used by the VMkernel for optimizing CPU and memory usage VMware vSphere 4.1: Install, Configure, Manage – Revision A

  31. Multicore Processors VMware vSphere 4.1: Install, Configure, Manage – Revision A

  32. Hyperthreading Hyperthreading enables a core to execute two threads, or sets of instructions, at the same time. To enable hyperthreading: • Verify that system supports hyperthreading. • Enable hyperthreading in the system BIOS. • Ensure that hyperthreading for the VMware ESX™/ESXi host is turned on. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  33. CPU Load Balancing VMware vSphere 4.1: Install, Configure, Manage – Revision A

  34. Memory Virtualization Overview The VMkernel manages a machine’s entire memory. • Part of this memory is used by the VMkernel. • Some memory is used by the service console (ESX only). • The rest is available for use by virtual machines: • Configured memory, plus overhead Virtual machines can use more memory than the physical machine has available. • This is called memory overcommitment. Memory compression improves virtual machine performance when memory is overcommitted. • When memory becomes overcommitted, virtual pages are compressed and stored in memory. • Compressed memory is faster to access than memory swapped to disk. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  35. Transparent Page Sharing The VMkernel detects identical pages in the memory of virtual machines and maps them to the same underlying physical page: • No changes to guest operating system required The VMkernel treats the shared pages as copy-on-write: • Read-only when shared • Private copies after write A best practice is to always keep transparent page sharing enabled. VM RAM VM RAM VM RAM hardware RAM VMware vSphere 4.1: Install, Configure, Manage – Revision A

  36. vmmemctl: Balloon-Driver Mechanism Deallocate memory from selected virtual machines when RAM is scarce. Ample memory.Balloon remainsuninflated. Guest is forced to page out to its own paging area. The VMkernel reclaims memory. Inflate balloon. (Driver demands memory from guest OS.) Guest can page in. ESX/ESXi grants memory. Deflate balloon.(Driver relinquishes memory.) VMware vSphere 4.1: Install, Configure, Manage – Revision A

  37. VMkernel Swap Each powered-on virtual machine needs its own VMkernel swap file: • Created when the virtual machine is powered on. Deleted when the virtual machine is powered off. • Default location: same VMware vStorage VMFS volume as virtual machine’s boot disk. • Size is equal to the difference between the memory guaranteed to it, if any, and the maximum it can use. • Allows the VMkernel to swap out the virtual machine entirely if memory is scarce. Use of VMkernel swap is a last resort. • Performance will be noticeably slow. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  38. Ballooning Compared with VMkernel Swapping VMware vSphere 4.1: Install, Configure, Manage – Revision A

  39. Lesson Summary • Identify the methods used by the VMkernel for optimizing CPU and memory usage VMware vSphere 4.1: Install, Configure, Manage – Revision A

  40. Lesson 3:Monitoring Resource Usage VMware vSphere 4.1: Install, Configure, Manage – Revision A

  41. Lesson Objectives • Monitor a virtual machine’s resource usage: • CPU • Memory • Disk • Network bandwidth VMware vSphere 4.1: Install, Configure, Manage – Revision A

  42. Performance-Tuning Methodology Assess performance. • Use appropriate monitoring tools. • Record a numerical benchmark before changes. Identify the limiting resource. Make more resources available. • Allocate more. • Reduce competition. • Log your changes. Benchmark again. Do not make casual changes to production systems. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  43. Guest Operating System Monitoring Tools Iometer Task Manager VMware vSphere 4.1: Install, Configure, Manage – Revision A

  44. The Perfmon DLL in VMware Tools provides virtual machine processor and memory objects to access host statistics inside a virtual machine. Using Perfmon to Monitor Virtual Machine Resources VMware vSphere 4.1: Install, Configure, Manage – Revision A

  45. VMware vCenter Server Performance Charts The Performance tab displays two kinds of charts for hosts and virtual machines: • Overview charts: • Display the most common metrics for an object • Advanced charts: • Display data counters not shown in the overview charts VMware vSphere 4.1: Install, Configure, Manage – Revision A

  46. Interpreting Data from the Tools VMware vCenter™ Server monitoring tools and guest operating system monitoring tools provide different points of view. Task Manager inguest operating system CPU Usagechart for host VMware vSphere 4.1: Install, Configure, Manage – Revision A

  47. Is a Virtual Machine CPU-Constrained? If CPU usage is continuously high, the virtual machine is constrained by CPU. But the host might have enough CPU for other virtual machines to run. Check the virtual machine’s CPU usage. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  48. Are Virtual Machines CPU-Constrained? • Multiple virtual machines are constrained by CPU if: • There is high CPU use in the guest operating system • There are relatively high CPU ready values for the virtual machines CPU Ready graph of several virtual machines Task Manager of several operating systems VMware vSphere 4.1: Install, Configure, Manage – Revision A

  49. Is a Virtual Machine Memory-Constrained? Check the virtual machine’s ballooning activity: • If ballooning activity is high, this might not be a problem if all virtual machines have sufficient memory. • If ballooning activity is high and the guest operating system is swapping, then the virtual machine is constrained for memory. VMware vSphere 4.1: Install, Configure, Manage – Revision A

  50. Is the Host Memory-Constrained? If there is active host-level swapping, then host memory is overcommitted. VMware vSphere 4.1: Install, Configure, Manage – Revision A

More Related