1 / 126

Instructor - Allan Ackerman VCA-DCV & VCP5-DCV

CIT 198 Week#12 Module 10 from the eBook Resource Management and Monitoring Sybex Chapter#10 Basic Troubleshooting. Instructor - Allan Ackerman VCA-DCV & VCP5-DCV. Click the graphic for assessment. This week our objectives will be. Complete labs 17 & 18 from the NDG/Cisco

mendel
Download Presentation

Instructor - Allan Ackerman VCA-DCV & VCP5-DCV

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. CIT 198 Week#12Module 10 from the eBook Resource Management and MonitoringSybex Chapter#10Basic Troubleshooting Instructor - Allan Ackerman VCA-DCV & VCP5-DCV Click the graphic for assessment

  2. This week our objectives will be • Complete labs 17 & 18 from the NDG/Cisco • When we do NDG lab 17 we will also be creating the CPUBusy.vbs script for our in-class lab. • Complete labs 25 & 26 on the in-class virtual lab. • Get lab 21 complete – so far five people have it complete. • In chapter 10 of the Sybex book we will be covering basic troubleshooting • In chapter 10 of the eBook we will be covering Resource Management and Monitoring. • Next week’s quiz will be evenly distributed from the Sybex book chapter 10, our eBook Chapter 10 and tonight’s labs and PowerPoint. Week#12 vSphere 5.1 & 5.5

  3. Important classroom info for the week of April 15 • The 8th quiz average is back down to 61%. Remember all quizzes are open book. Have your eBook functional at school as well as your Sybex book. Look things up. (Remember the Gilmore book can be on 4 devices at one time. It is also extremely easy to move from device to device. So in reality you really can have your eBook on as many devices as you want but only 4 active.) • First do NDG labs 17 & 18 • Next finish off in-class lab#21 – so far five people have it complete. It will take a couple of hours. • Next complete all in-class labs through lab#26. Week#12 vSphere 5.1 & 5.5

  4. Our NDG lab#17 Our goals in this lab will be to: 1. Create a resource pool named Fin-Test. 2. Create a resource pool named Fin-Prod. 3. Create CPU contention. 4. Verify resource pool functionality. 5. We will learn how to set the CPU affinity. We will also create the CPU busy script for our in-class virtual lab. Note CPUBusy.vbs is a very simple visual basic script and is a nice utility to have around. Week#12 vSphere 5.1 & 5.5

  5. Our NDG lab#17 Here is a brief description of the code. Even though you might not like the task – it is always a good idea to go over scripts to see how they work. Your computer skills will increase many levels. The dim statement (short for dimension) allows you to declare the variables you will use in your program. We will use 5 of them. The propose of the program is just to do some random calculations to make the CPU work. The variable, Goal, will contain the value 3,000,000. That will be the number of sines we calculate each time through the loop. The variable, before, will hold the time that we start the loop Week#12 vSphere 5.1 & 5.5

  6. Our NDG lab#17 The variable, i, will be our counter for our for next loop. Each time we go through the loop 3 million + 1 times. Each time through the while loop x is set to .000001 and is incremented by that amount each iteration s0 when we finish the for next loop x is a little over 3. We do a random sine calculation on the x value and store in the variable y. We then increment y by .00001. Remember these are random calculations and their only purpose is to make the CPU work. The next line does one more random add with variable y. The next line prints that we did 3,000,000 sines and then calculates how long the loop took to complete: Int(timer-before + 0.5) Note: timer is the current time and before holds the time we started the loop. Adding .5 and then taking the Int value will round to the nearest second. The next slide contains the script. Week#12 vSphere 5.1 & 5.5

  7. Our NDG lab#17 dim goal dim before dim x dim y dim i goal = 3000000 do while true before = timer x = 0.000001 for i = 0 to goal x = x+ 0.000001 y = sin(x) y = y + 0.00001 next y = y + 0.01 wscript.echo "I did three million sines in " & Int(timer -before + 0.5) & " seconds!" loop • Create this script and place it in the c:\NFS\utils folder on vc.vita.local • We will be using it in other labs when we run the vMA. Week#12 vSphere 5.1 & 5.5

  8. Our NDG lab#17 To launch your code just double click on it. To stop your code open up task manager. Go to the processes tab Find the wscript process – should be toward the end of the list and click on the End Process command button. You can also right click on the file name and select open with command prompt. The script will then write to the command window instead of giving you a dialog box. You can exit the program by hitting cntrl+C. If you want you can download the CPUBusy.vbs script from the instructor’s station. Once again – if you are not in the habit of looking a scripts – start doing so now – this is what will turn you into a power user. Week#12 vSphere 5.1 & 5.5

  9. Our NDG lab#18 Our goals in the lab will be to • Create a virtual machine alarm that monitors for a condition. • Create a virtual machine alarm that monitors for an event. • Trigger virtual machine alarms and acknowledge them. • Disable virtual machine alarms. Make sure that you know the two items you can monitor for 1. a condition or state 2. monitor for an event. Week#12 vSphere 5.1 & 5.5

  10. Our NDG lab#18 Make sure that you know the two types of triggers 1. a condition or state triggers • Event triggers. Make sure you know that every alarm type has these three actions: • Send a notification email • Send a notification trap • Run a command Note: vm and host alarms will have more actions Week#12 vSphere 5.1 & 5.5

  11. Our NDG lab#18 Make sure that you know the four state changes. You can set an alarm to trigger when the state changes. • From a green circle to a yellow triangle • From a yellow triangle to a red diamond • From a red diamond to a yellow triangle • From a yellow triangle to a green circle For every action you can specify an option • Empty (no interest) • Once (do the action one time) • Repeat (repeat the action until another color change occurs.) Week#12 vSphere 5.1 & 5.5

  12. Our in-class lab#25 • SDRS works with storage in ways that are very similar to what DRS does with CPU and memory. You organize datastores into datastore clusters made of multiple datastores with the same characteristics. Then, when you create a VM, you place the VM into the datastore cluster and the appropriate datastore is chosen by the system based on the available space on the logical unit numbers (LUNs) of each datastore and on the I/O performance (if you chose that, too.) On top of that the datastore cluster can monitor itself and use Storage vMotion whenever necessary to provide balance across the datastore cluster and to increase the overall performance of all datastores in the datastorecluster. • This is the structure we will be setting up in lab#25. SDRS does need Enterprise Plus licensing. Week#12 vSphere 5.1 & 5.5

  13. Our in-class lab#26 In this lab we will copy the CPUbusy.vbs script from NDG and bring it down to the in-class lab. Your instructor made several changes to the script and will go over those in class this week. The script has already discussed and covered in this PowerPoint on slides 5 -8. We be also be creating an vApp called NetDskBusy. It will contain two of our XP pro VMs. We will create a very simple batch file that will put a load on our vnics and our Starwind SAN. Here is the basic idea, we will place XPproA and XPproD in our new vApp. In XPproD we will copy over the XP pro installation CD and place it into a folder called XPDist. We will then share the folder. Week#12 vSphere 5.1 & 5.5

  14. Our in-class lab#26 The folder will be shared using the everyone built-in group with the read permission. On XPProA we will create two folders on the root of the C: drive. One folder will be called scripts and the other will be test. Create the following batch file and place it in c:\scripts with the following name NetDskActive.bat. The code for the script is on the next slide. Also place the CPUbusy.vbs script in the same folder Week#12 vSphere 5.1 & 5.5

  15. Our in-class lab#26code for NetDskActive.bat @echo off Cls :start Echo start copy Cd\test Del *.* /s /q Xcopy z:\*.* c:\test /v /e Echo copy process ended Goto start Week#12 vSphere 5.1 & 5.5

  16. Our in-class lab#26 • Next on XPproA you need to map Z: to \\XPproD\XPdist folder • Next place shortcuts on the desktop of XPproA to both the CPUbusy and the NetDskActive scripts. • The methodology of this script should be obvious – the contents of the test folder on XPProA are deleted, then all the files are transferred from the share on XPdist over the network – putting some stress on our vnics between the two machines. The data is written to the vmdk putting some stress on the SAN. When complete the whole process starts all over again. • Open up two command prompts and run both scripts and have your instructor sign off on the lab. • A cntrl+c will shut down both scripts. Week#12 vSphere 5.1 & 5.5

  17. Resource Management and Monitoring Module 10 eBook Week#12 vSphere 5.1 & 5.5

  18. You Are Here Resource Management and Monitoring Week#12 vSphere 5.1 & 5.5

  19. Importance • Although the VMkernel works proactively to avoid resource contention, maximizing performance requires both analysis and ongoing monitoring. Week#12 vSphere 5.1 & 5.5

  20. Module Lessons • Lesson 1: Virtual CPU and Memory Concepts • Lesson 2: Resource Controls • Lesson 3: Resource Pools • Lesson 4: Monitoring Resource Usage • Lesson 5: Using Alarms Week#12 vSphere 5.1 & 5.5

  21. Lesson 1 Virtual CPU and Memory Concepts Week#12 vSphere 5.1 & 5.5

  22. Learner Objectives • After this lesson, you should be able to do the following: • Discuss CPU and memory concepts in a virtualized environment. • Describe what over-commitment of a resource means. • Identify additional technologies that improve memory utilization. • Describe how VMware vSphere® Virtual Symmetric Multiprocessing works and how hyperthreading is used by the VMkernel. Week#12 vSphere 5.1 & 5.5

  23. Memory Virtualization Basics • VMware vSphere® has three layers of memory. • Guest operating system virtual memory is presented to applications by the operating system. • Guest operating system physical memory is presented to the virtual machine by the VMkernel. • Host physical memory that is managed by the VMkernel provides a contiguous, addressable memory space that is used by the virtual machine. Week#12 vSphere 5.1 & 5.5

  24. Virtual Machine Memory Overcommitment • Allow RAM overcommitment • A virtual machine swap file (.vswp) is created when a virtual machine’s maximum RAM allocation exceeds its minimum RAM allocation • Virtual machines power on only if: • Minimum memory available, that is overhead memory • Swap file size equals the difference between allocated and reserved memory Week#12 vSphere 5.1 & 5.5

  25. Memory Reclamation Techniques • Economize use of physical memory pages: • Transparent page sharing allows pages with identical contents to be stored only once. • Deallocate memory from one virtual machine for another: • Ballooning mechanism, active when memory is scarce, forces virtual machines to use their own paging areas. • Memory compression: • Attempts to reclaim some memory performance when memory contention is high. • Host-level SSD swapping: • Use of a Solid State Drive (SSD) on the host for a host cache swap file may increase performance. • Page virtual machine memory out to disk: • Use of VMkernel swap space is the last resort. It performs poorly. Week#12 vSphere 5.1 & 5.5

  26. Virtual SMP Week#12 vSphere 5.1 & 5.5

  27. 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 ESXi host is turned on. Week#12 vSphere 5.1 & 5.5

  28. CPU Load Balancing Remember a hyperthreaded CPU is not as efficient as a real core. Week#12 vSphere 5.1 & 5.5

  29. Review of Learner Objectives • You should be able to do the following: • Discuss CPU and memory concepts in a virtualized environment. • Describe what over-commitment of a resource means. • Identify additional technologies that improve memory utilization. • Describe how Virtual SMP works and how hyperthreading is used by the VMkernel. Week#12 vSphere 5.1 & 5.5

  30. Lesson 2 Resource Controls Week#12 vSphere 5.1 & 5.5

  31. Learner Objectives • After this lesson, you should be able to do the following: • Describe the resources that can be optimized on virtual machines. • Assign share values for CPU, memory, and disk resources. • Establish CPU, memory, and disk reservations and limits. • Describe how virtual machines compete for resources. Week#12 vSphere 5.1 & 5.5

  32. Resource Contention • Because virtual machines simultaneously use the resources of an ESXi host, they should know how to respond when virtual machines are competing for resources. • For proper resource management, vSphere has mechanisms to do the following: • Enable less, more, or an equal amount of access to a defined resource • Prevent a virtual machine from consuming large amounts of a resource • Allow a virtual machine, whose performance is not adequate or requires a certain amount of a resource to run properly, to have a guaranteed amount of resource Week#12 vSphere 5.1 & 5.5

  33. Shares, Limits, and Reservations available capacity limit Remember shares kick in only when there is contention Shares are usedto compete inthis range. reservation 0 MHz/MB A virtual machine willpower on only if its reservationcan be guaranteed. Week#12 vSphere 5.1 & 5.5

  34. How Virtual Machines Compete for Resources Shares are proportional Week#11 vSphere 5.1 & 5.5

  35. Systems for Optimizing Virtual Machine Resource Use Vmmemctl is the balloon driver we get in Vmware tools Week#12 vSphere 5.1 & 5.5

  36. Review of Learner Objectives • You should be able to do the following: • Describe the resources that can be optimized on virtual machines. • Assign share values for CPU, memory, and disk resources. • Establish CPU, memory, and disk reservations and limits. • Describe how virtual machines compete for resources. Week#12 vSphere 5.1 & 5.5

  37. Lesson 3 Resource Pools Week#12 vSphere 5.1 & 5.5

  38. Learner Objectives • After this lesson, you should be able to do the following: • Describe resource allocation settings for CPU and memory. • Create a resource pool. • Set resource pool attributes. • Describe expandable reservations. Week#12 vSphere 5.1 & 5.5

  39. 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 vSphere® Distributed Resource Scheduler™(DRS). • It provides resources for virtual machines and child pools. rootresource pool resource pools Week#12 vSphere 5.1 & 5.5

  40. 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 Week#12 vSphere 5.1 & 5.5

  41. 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. Week#12 vSphere 5.1 & 5.5

  42. 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. • You must cap the resource consumption of the test/dev virtual machines. Week#12 vSphere 5.1 & 5.5

  43. Resource Pool Example Shares, reservations, limits Week#12 vSphere 5.1 & 5.5

  44. Resource Pools Example: CPU Shares Week#12 vSphere 5.1 & 5.5

  45. Resource Pools Example: CPU Contention Week#12 vSphere 5.1 & 5.5

  46. 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 A mismanaged or mis-sized expandable reservation might claim all unreserved capacity. Week#12 vSphere 5.1 & 5.5

  47. Root resource pool Total CPU: 10,200MHz Total memory: 3,000 MB 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 VM2 R=300 VM1 R=400 VM3 R=500 Week#12 vSphere 5.1 & 5.5

  48. Root resource pool Retail pool Total CPU: 10,200MHzTotal memory: 3,000MB VM4 R=500 VM1 R=400 VM3 R=500 VM5 R=500 VM2 R=300 VM6 R=500 VM7 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 Week#12 vSphere 5.1 & 5.5

  49. Admission Control for CPU and Memory Reservations Power on a virtual machine. Create a new subpoolwith its own reservation. Increase a pool’sreservation. Admission control Can this poolsatisfy reservation? Succeed Yes No Expandablereservation? No Fail Yes – Go to parent pool. Week#12 vSphere 5.1 & 5.5

  50. Resource Pool Summary Tab Click the resource pool’s Summary tab in the Hosts and Clusters inventory view. Week#12 vSphere 5.1 & 5.5

More Related