Professional Documents
Culture Documents
CPU Analysis
CPUloadisgeneratedby Theguestoperatingsystemrunninginsidethevirtualmachine Theapplicationsrunninginthevirtualmachine ESXServer,asitprovidesavirtualinterfacetothehardware AlthoughtheworkperformedbyESXServerdoescausesomeCPUload,applicationsinthevirtualmachines generatethegreatmajorityofprocessingonasystem.Asolidunderstandingoftheworkloadprofileofthose applications,whethertheyarerunninginavirtualenvironmentordirectlyonhardware,canhelpyouanalyze CPUusage.
Theoutputincludesthefollowinginformation: ThePCPU(%)lineintheheadershowsutilizationforthephysicalprocessorsonthehostsystembycore andthetotalphysicalCPUusage.Thecommadelimiteddatafirstdisplayedshowscoreutilization followedbyused total,whichaveragesutilizationofallcores. TheLCPU(%)lineshowsthepercentageofCPUutilizationperlogicalCPU.Thepercentagesforthelogical CPUsmappingtoasinglephysicalcoreaddupto100percent.Thislineappearsonlyifhyperthreading ispresentandenabled. TheCCPU(%)lineshowsthepercentagesoftotalCPUtimeasreportedbytheESXServerserviceconsole. Ifyourunanythirdpartysoftware,suchasmanagementagentsandbackupagents,insidetheservice console,youmightseeahighCCPU(%)number. Anidleworldisrunning.InESXServer,aworldisamanagedexecutionentitysimilartotheoperating systemconceptofaprocess.The%USEDentryofthatidleworlddisplaysthepercentageofCPUcyclesthat remainunused.Ifesxtopreportslessthan100percentutilizationfortheidleworld,thatmeansonlya fractionofonephysicalcoreremainsavailableforadditionalwork.Themaximumvalueforthisnumber canbemanyhundredsofpercent(upto100percentforeachcore)smallnumbershererepresentheavily loadedsystems. Checktheutilization(%USED)ofthevirtualmachinesyouwanttoanalyze.Thevirtualmachinesare reportedherewiththenamesspecifiedatthetimetheywerecreated.Aswiththeidleworldsrow,
utilizationforeachvirtualmachinecanexceed100percent.AvirtualmachinethatusestwovirtualCPUs, forexample,canshowupto200percentCPUutilization. Youcanexpandthegroupdataforavirtualmachineyouwanttoexamineinmoredetail.Todoso,press e,thenenterthegroupIDnumber(shownintheGIDcolumn)forthevirtualmachine.Thescreencapture belowcontainsaCPUexpandedinformationdisplayforGID30fromthepreviousscreencapture.When youexpandthedisplay,esxtopexpandsrowsandprovidescounterdataforeveryworldinthegroup. Thisdataincludes: vmmXForeachvirtualCPUprovidedtothevirtualmachine,esxtopdisplaysavirtualmachine monitor(VMM)world.Thisworldperformsthemajorityoftheworkrequiredtoexecuteand virtualizethevirtualmachinescode(operatingsystem,application,andhypervisor). vcpu-XESXServercreatesavcpu-XworldtoassisttheVMMworldforeachvirtualCPU.The primaryworkofthisworldisvirtualizationofI/Odevices. mksThislinereportsdataassociatedwithservicinginterruptsformouse,keyboard,andscreen. vmware-vmxTheVMXworldsassistinmaintenanceandcommunicationswithotherworldsand generallydonotrepresentamaterialportionofthegrouputilization.
Memory Analysis
Hostmemoryutilizationincludesallmemoryusedbyvirtualmachinesonthehostandallmemoryusedby ESXServeritself.ThemonitoringcapabilitiesinESXServerdonothelpyoudetectimproperusageor configurationofmemorywithinavirtualmachine.Youmustusetraditionalmonitoringtoolsintheguest operatingsystemtoidentifymemoryhungryapplicationsorshortagesthatleadtoswappinginsidethe virtualmachine.
Copyright 2008 VMware, Inc. All rights reserved. 5
Theoutputincludesthefollowinginformation: Theheadershowshostdatathataffectsallvirtualmachinesrunningonthehost.Thephysicalmemory row(PMEM)showsthetotalRAMinstalledonthesystem,theamountusedbytheserviceconsole(cos), thememoryusedbytheVMkernel(vmk),andotherstatistics. ThenextfewrowsshowhostlevelmemorystatisticsforvariousESXServersubsystems: VMKMEMshowsmemorystatisticsfortheESXServerVMkernel. COSMEMdisplaysthememorystatisticsreportedbytheESXServerserviceconsole. PSHAREdisplaysESXServerpagesharingstatistics. SWAPdisplaysESXServerswapusagestatistics. MEMCTLdisplaysstatisticsforthememoryballoondriver. Dataforeachvirtualmachineonthehostappearsasarowinthetableatthebottomofthedisplay.The followingcountersareofparticularinterestwhenevaluatingvirtualmachinememoryusage: ThetotalmemoryallocatedtothevirtualmachineappearsintheMEMSZcolumn. Thememorythatisactivelyinusebytheguestoperatingsystemanditsapplicationsisreportedin thetouchedandactivecounters(TCHDfortouchedmemoryand%ACTV,%ACTVS,and%ACTVFfor activememory).%ACTVSand%ACTVFprovideslowandfastaveragesofthe%ACTVcounter.Eitherthe %ACTVorTCHDcounterscanserveasgoodpredictorsofmemoryusage.Whentheactivelyused memoryofoneormorevirtualmachinesexceedstheamountofmemoryonthehost,theserverstarts toswapandperformancedegradessignificantly. Knowingtheactivitycausedbytotheballoondrivercanbeuseful.Whentheballoondriverisactive intheguestoperatingsystem,thevirtualmachinesMCTL?counterissettoY.Theamountofmemory theballoondriverisusinginaspecificguestoperatingsystemisreportedunderMCTLSZ.ESXServer usestheballoondrivertorecovermemoryfromlessmemoryintensivevirtualmachinessoitcanbe usedbythosewithlargeractivesetsofmemory.ESXServertakesthismemorymanagementstep beforeitresortstoswappingmemorytodisk. TherateatwhichESXServerisswappingmemorytoandfromdiskisdisplayedbytheswapwrite (SWW/s)andswapread(SWR/s)counters.Thesecountersshouldremainnearzerofor highperformingsteadystateoperations.AsustainedrateofasignificantnumberofMB/sisacertain signthatthehostdoesnothaveenoughmemory.
Setmemoryreservationstoprovidetheminimalamountofmemoryrequiredfortheoperatingsystem andcriticalapplications.Thisapproachallowsforsustained,fastaccessforcriticalcodeandprovides hintstoVirtualCenterforoptimalpositioningofvirtualmachinesacrosstheDRScluster. MakesuretheamountofmemoryusedbytheVMkerneltomaintainthevirtualmachinesisacceptable. Thisvalue,reportedforeachvirtualmachinebytheoverheadcounter(OVHD),isdependentonthe memorysizeofthevirtualmachine,thenumberofvirtualCPUsprovidedtothevirtualmachine,and whetherthevirtualmachineisrunninga64bitoperatingsystem.Fewervirtualmachinesonthehost, feweraggregatevirtualCPUs,andlowerprecisionoperatingsystems(32bitasopposedto64bit)lower thisnumber.Youcanfreeresourcesforallvirtualmachinesintheclusterbyreducinganyofthesefactors inthecluster. SizevirtualmachinesonNUMAsystemstoguaranteethateachvirtualmachinesmemoryfitsonasingle node.Ifthereisamismatch,youmusteitherdecreasethememoryallocatedtoavirtualmachineor increasethenodesmemorysize. Sizeguestsappropriatelyaccordingtotheirneeds.Forexample: Dependingontheaccesspatternforthedata,databasesmightnotbenefitfromthelastdoublingof cachesize.Experimentwithsmallercachesizesandseeifperformancedrops.Ifthesmallercachesize doesnotdegradeperformance,decreasethevirtualmachinesavailablememorysoothervirtual machinescanusethatmemory. Checktheguestoperatingsystemsstatisticsforswappinginsidethevirtualmachine.Provide memoryasneededandpayattentiontoesxtopstatisticstoseeifprovidingtheadditionalmemory generatesanewbottleneckonthehost.
Storage Analysis
Storageoftenlimitstheperformanceofenterpriseworkloads.Traditionalmeansofanalysisaresoundfor evaluatingstorageperformanceinvirtualdeployments.Thissectionintroducestoolsforidentifyingheavily usedresourcesandvirtualmachinesthatplacehighdemandsontheirstoragesystems.Youcanthenapply traditionalmethodstocorrecttheproblems. ThissectiondoesnotcoveriSCSIstorageusingsoftwareinitiators.WhenvirtualmachinesaccessiSCSIstorage throughthehypervisorsiSCSIinitiatororasoftwareinitiatorinsidetheguestoperatingsystem,thestorage trafficappearsontheVMkernelnetworkorthevirtualmachinesnetworkstack.SeeNetworkAnalysison page 11formoreinformation.
Adapter View
Intheadapterview(d),eachphysicalHBAappearsonarowofitsown,identifiedbytheappropriateadapter name.YoucancheckthisshortnameagainstthemoredescriptivedataprovidedthroughtheVirtual InfrastructureClienttoidentifythehardwaretype. PressetoexpandtheHBAslistedintheadapterview.Theexpandeddisplayshowsworldsthatareusingthe HBAs.LocateavirtualmachinesworldIDintheWIDcolumntofindthedataforactivityrelatedtothatvirtual machine.
Counters to Check
Theoutputincludesthefollowinginformation: TheACTVcounterprovidesasnapshotofcurrentactivity.TheQUEDcounterliststhenumberofqueued commandsthatthehostwillprocessafterACTVcommandshavefinished.AsustainednumberofACTV commandsishealthyandindicatescontinuingdiskactivities.Asustainednumberofqueuedcommands indicatesaheavilyloadedsystem. TheLOADcounterprovidesanestimateoftheutilizationofasingleHBA.Itrepresentstheratioofthe numberofcommandsthatareactiveorqueuedtothetotalnumberofcommandsthatcanbeactiveor queuedatonetime.ThusaLOADvalueof1.0meansthatboththeactivebufferandqueuearefull.Atthis point,theserverbeginsfailingtoexecutecommands. The%USDcounterprovidesthepercentageofthequeuedepthusedbyVMkernelactivecommands.Very highvaluesindicatethelikelihoodthatcommandsarequeued,andyoumayneedtoadjustthequeue depthsforsystemsHBAs. Youcanviewthetotallatencyseenfromavirtualmachinetothearrayinthevirtualmachinelatency counter(GAVG/cmd),whichshowsthesumofthelatenciescausedbythehardware(DAVG/cmd)andthose causedbytheVMkernel(KAVG/cmd). Abortedcommandsasdisplayedbytheabortedcommandspersecondcounter(ABRTS/s)represent commandsissuedbytheguestoperatingsystemafteritdeterminesthatastoragerequestcannotbe fulfilled.Abortsareasignthatthestoragesystemcannotmeetthedemandsoftheguestoperatingsystem.
10
Network Analysis
Networkanalysisisusuallyastraightforwardprocessforwhichtypicalnativetechniquesarevalid.Checking forloadrelativetolinkthroughputandlookingfordroppedpacketscanidentifyallbutthemostsubtleof problems.
Thefollowingpropertiesofthisdisplayareworthparticularattention: Eachrowpresentsdataforonenetworkrelateditemonthehost,forexample:aphysicalNIC(vmnicX), avirtualswitchinterface(vswifX),avirtualmachine(containsthevirtualmachinename),theVMkernel networkstack(vmk-tcpip-A.B.C.D). Thenetworkitemsareorganizedbythevirtualswitchtowhichtheyareattached.Thevirtualswitch nameislistedintheDNAMEcolumn. NetworktrafficonthehypervisorsiSCSIinitiatorappearsontheVMkernelnetworkrow,whichcontains thenamevmk-tcpip-A.B.C.D,whereA.B.C.DistheVMkernelIPaddress. NetworktrafficoniSCSIinitiatorsconfiguredintheguestoperatingsystemappearonthelineforthe virtualNICdisplayedusingthevirtualmachinesnameasshownontheesxtopnetworkscreen. Youcancalculatetotalthroughputforeachitembysummingthetotaltransmitteddata(MbTX/s)and receiveddata(MbRX/s)forthatitem.Asthephysicalhardwarebecomessaturated,thesystembeginsto droptransmittedandreceivedpackets(%DRPTXand%DRPRX,respectively).Dependingontheprotocol, thesystemmayretransmitthedroppedpacketsatalatertime.
11
References
ReadyTimeObservations http://www.vmware.com/pdf/esx3_ready_time.pdf VMwareInfrastructure3FibreChannelSANConfigurationGuide http://www.vmware.com/pdf/vi3_35/esx_3/r35/vi3_35_25_san_cfg.pdf VMwareInfrastructure3ResourceManagementGuide http://www.vmware.com/pdf/vi3_esx_resource_mgmt.pdf
12
Appendix: Counters
Thefollowingtablesincludedescriptiveinformationoncountersmentionedinthisdocument: Table 1. CPU counters
Counter GID %USED NWLD %RDY Description GroupID. ThepercentageofCPUthatisusedbyaworldorgroup. Thenumberofworldsinagroup.Whenthisnumberisgreaterthanone,therowcanbeexpanded todisplayinformationoneachworld. Thepercentageoftimethataworldorgroupiswaitingforaprocessortobeavailabletoexecuteits workload.
NMIG
QUED
DAVG/cmd
13
GAVG/cmd ABRTS/s
VMware, Inc. 3401 Hillview Ave., Palo Alto, CA 94304 www.vmware.com Copyright 2008 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022, 6,944,699, 6,961,806, 6,961,941, 7,069,413, 7,082,598, 7,089,377, 7,111,086, 7,111,145, 7,117,481, 7,149, 843, 7,155,558, 7,222,221, 7,260,815, 7,260,820, 7,269,683, 7,275,136, 7,277,998, 7,277,999, 7,278,030, 7,281,102, and 7,290,253; patents pending. VMware, the VMware boxes logo and design, Virtual SMP and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions. Microsoft, Windows and Windows NT are registered trademarks of Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. All other marks and names mentioned herein may be trademarks of their respective companies. Revision 20080311 Item: TN-056-PRD-01-01
14