You are on page 1of 36

Oracle Database 10g Performance on Windows Server 2008 Hyper-V Virtual Machine

By Gary W. Parker
Senior Oracle Consultant

Performance Tuning Corporation


October 2008

TuneRightRunFast

Table of Contents
TableofContents ...................................................................................................................................... 2 ListofFigures ......................................................................................................................................... 3 ListofTables........................................................................................................................................... 3 Introduction............................................................................................................................................... 4 TestingProcedures .................................................................................................................................... 5 TestResults/Conclusions ......................................................................................................................... 6 OLTPTestResults .................................................................................................................................. 6 BrowseOnlyTestResults...................................................................................................................... 9 Conclusions .......................................................................................................................................... 12 TestingEnvironment ............................................................................................................................... 14 HyperVConfigurationConsiderations.................................................................................................... 15 HyperVStorageConsiderations ......................................................................................................... 15 HardwareConfiguration...................................................................................................................... 16 DatabaseServers............................................................................................................................. 16 ClientWorkstation .......................................................................................................................... 16 SoftwareConfiguration ....................................................................................................................... 16 OSConfiguration............................................................................................................................. 16 HyperVsetup.............................................................................................................................. 17 DatabaseServers ......................................................................................................................... 17 OracleConfiguration ...................................................................................................................... 18 SwingBenchConfiguration ............................................................................................................. 19 Recommendations/DeploymentScenarios........................................................................................... 21 Recommendations ............................................................................................................................... 21 DeploymentScenarios ......................................................................................................................... 21 TestingandDevelopment ............................................................................................................... 21 RemoteSiteVirtualizationandConsolidation ................................................................................ 22 RepurposingOlderHardware.......................................................................................................... 22 AppendixA .............................................................................................................................................. 23 HyperVConfiguration......................................................................................................................... 23 AppendixB............................................................................................................................................... 26 HardwareRequirements ..................................................................................................................... 26 Memory ........................................................................................................................................... 26 Processors ....................................................................................................................................... 27 Networking...................................................................................................................................... 27 Storage ............................................................................................................................................ 27 AppendixC............................................................................................................................................... 29 HardwareConfiguration...................................................................................................................... 29 AppendixD .............................................................................................................................................. 30 OracleDatabaseConfiguration........................................................................................................... 30
Oracle10gonHyperV Page2of36

TuneRightRunFast

AppendixE............................................................................................................................................... 32 HowtoConfiguretheWindowsOSforLargePageSupport.............................................................. 32 LargePagesinWindows ................................................................................................................. 32 LargePageSupport ......................................................................................................................... 32 Toenablelargepagesupport:......................................................................................................... 33 References............................................................................................................................................... 35

List of Figures
Figure1SwingBenchFullOLTPTestResourceOverviewonHyperV01.................................................. 6 Figure2SwingBenchFullOLTPBenchmarkTestOverviewonHyperV01 .............................................. 7 Figure3SwingBenchFullOLTPTransactionsperMinute(TPMs)andTransactionResponseTimeon HyperV01................................................................................................................................... 8 Figure4SwingBenchBrowseOnlyTestResourceOverviewonHyperV01 ...................................... 10 Figure5SwingBenchBrowseOnlyBenchmarkTestOverviewonHyperV01 ................................... 10 Figure6SwingBenchBrowseOnlyTransactionsperMinute(TPMs)andTransactionResponseTime onHyperV01 ........................................................................................................................... 11 Figure7LabHardwareConfigurationOverview ................................................................................... 14 Figure8HyperVconfigurationattributesfortheHyperV01virtualmachine ..................................... 17 Figure9OverviewofHyperVarchitecture .......................................................................................... 24

List of Tables
Table1ServerConfigurationforHyperV01andPhysical01 .................................................................. 5 Table2SwingBenchFullOLTPTestResultsonHyperV01 ...................................................................... 6 Table3SwingBenchBrowseOnlyTestResultsonHyperV01 ............................................................. 9 Table4Oracle10gHyperVLabHardwareConfiguration .................................................................... 29 Table5DBPHYSdatabaseparametersonphysicalmachinePhysical01 .............................................. 30 Table6DBVM01databaseparametersonvirtualmachineHyperV01 ................................................ 31

Oracle10gonHyperV

Page3of36

TuneRightRunFast

Introduction
Microsoftscurrentserveroperatingsystemoffering,WindowsServer2008,includesitsfirstenterprise worthyvirtualizationproductbundledwiththe64bitversionoftheOS.HyperV,anoption,whichplaysa roleintheoperatingsystem,isthenextgenerationhypervisorbasedvirtualizationtechnology.Itenables ITmanagerstomakebetteruseoftheirhardwareinvestmentsbyconsolidatingmultipleserverrolesas severalseparatevirtualmachinesrunningonasinglephysicalmachine.HyperVwillefficientlysupport multipleoperatingsystemsWindows,Linuxandothersinparallelonasinglephysicalservertofully leveragethepowerof64bitcomputing. OracleDatabase10gEnterpriseEditioniscurrentlyoneofthemostwidelydeployed databasesoftware packages in the world. Since its introduction in 1977, Oracle database software has been ported to a variety of hardware platforms and Operating Systems. While some database vendors only support one platformorofferdifferentdatabase versionsoneachplatform,Oracleoffersaconsistentproductacross allmajorOperatingSystems,includingtheWindowsoperatingsystem. TheWindowsServeroperatingsystem isaTier1fullysupported platformfor Oracle. Oracle7wasthe firstdatabasetoshiponWindowsin1994andtodayWindowsServerisabasedevelopmentplatformfor Oracle.OracleonWindowsiswidelydeployedinthecorporateenvironment.29%ofOraclesrevenueis derivedfromtheWindowsplatform.Thex64platformallowsunlimitedscalabilityandLargePagesupport for database instances with large memory requirements. It is a top performing DBMS on the Windows Serverplatform. OraclecurrentlysupportsOracleDatabase10gR2onthefollowingeditionsofWindowsServer2008: WindowsWebServer2008(x86andx64) WindowsServer2008Standard(x86andx64) WindowsServer2008Enterprise(x86andx64) WindowsServer2008Datacenter(x86andx64)

The purpose of this whitepaper is to demonstrate the performance capabilities of the HyperV virtual machine as compared to the underlying physical machine and to highlight some of the advantages and usagescenariosofvirtualization. For thisperformancecomparison,twoplatformsweretestedone a physical server and the other a HyperV virtual machine. Both were configured the same with the Windows Server 2008 Enterprise Edition x64 operating system and Oracle Database 10g R2. A free database testing and demonstration tool, SwingBench v2.3, was used to perform the benchmark tests. ThegoalofthiscomparisonistodemonstratethattheHyperVvirtualplatformcandeliverperformance as good or better as can be achieved on a standalone physical machine for the Oracle 10g Database environment.

Oracle10gonHyperV

Page4of36

TuneRightRunFast

Testing Procedures
ThegoalofthetestingwastomeasureandcomparetheresourceusageandtheTransactionsperMinute /Second(TPM/TPS)achievedonseparatedatabaseservers(physicalandvirtual)whenbothmachines areidenticallyconfigured. Note: ThetwoPowerEdgeserversusedforthisbenchmark,Physical01andPhysical02,wereconfigured exactly the same. The underlying physical machine that hosted the HyperV01 virtual machine (Physical02) was configured with 2 QuadCore processors and 16.0 GB of physical memory. For the HyperV01 virtual machine, 14.0 GB of memory was allocated and 4 virtual processors were defined. The configuration of the Physical01 server was downgraded for available memory and numberofCPUstomatchthatoftheHyperV01virtualmachineinordertoprovideanapplesto applescomparison. Table1showstheconfigurationofthetwoplatformsutilizedforthebenchmarktests.
PhysicalMemory CPUs OperatingSystem OracleDatabaseName OracleVersion DatabaseSGAsize DatabasePGAsize WindowsLargePage SupportConfigured? HyperV01 (HyperVvirtualmachine) 14.0GB 4 WindowsServer2008Enterprise Editionx64SP1 DBVM01 10.2.0.4.0 4.0GB 1.0GB Yes Physical01 (physicalmachine) 14.0GB 4 WindowsServer2008Enterprise Editionsx64SP1 DBPHYS 10.2.0.4.0 4.0GB 1.0GB Yes

Table1ServerConfigurationforHyperV01andPhysical01

TwoSwingBenchbenchmarktestsetswereexecutedforthiscomparison. The full transaction mix consisted of the standard set of Order Entry OLTP tests. This set included the followingprocesses: CustomerRegistration BrowseProducts OrderProducts ProcessOrders BrowseOrders

ThebrowseonlytransactionmixconsistedofthefollowingprocessesfromtheOrderEntryOLTPtests: BrowseProducts BrowseOrders

Oracle10gonHyperV

Page5of36

TuneRightRunFast

Forbothsetsoftests,thenumberofconcurrentuserswassetto50andtheloadratiowassetat50%for eachtransactionprocessoftheset.ThiscriteriawasutilizedforboththeDBPHYS(Physical01)and DBVM01(HyperV01)databases.

Test Results / Conclusions


Theresultsofthetwobenchmarksetsagainsteachmachineconfigurationaredescribedinthefollowing sections. The Windows Resource Monitor was used to measure CPU and Memory utilization, as the SwingBenchCPUmonitorisdesignedtoworkonlyontheLinux/UNIXplatform.

OLTP Test Results


ThesummaryresultsofthefullOLTPtestsareshowninTable2.
Application: Benchmark Scenario HyperV01 Physical01 SwingBench Order Entry - Full OLTP Transaction Mix (4 CPUs) Total Avg. Memory Concurrent CPU Storage Utilization Swap Users Utilization Utilization (4GB SGA) Utilization 50 95% 64% / 74% 46% 0% 50 92% 66% / 75% 44% 0%

Average TPMs Achieved 16,916 17,071

Max TPMs Achieved 18,634 19,637

Average TPSs Achieved 294 299

Max TPSs Achieved 407 445

Table2SwingBenchFullOLTPTestResultsonHyperV01

ThefullOLTPtestutilized95%ofCPUand46%ofavailablememoryonthevirtualplatform(HyperV01)as showninFigure1.

Figure1SwingBenchFullOLTPTestResourceOverviewonHyperV01
Oracle10gonHyperV

Page6of36

TuneRightRunFast

Figure2presentsanoverviewoftheOLTPbenchmarkonthevirtualplatform,whichincludestheaverage andmaximumTransactionsperMinute(TPMs)andTransactionsperSecond(TPSs).

Figure2SwingBenchFullOLTPBenchmarkTestOverviewonHyperV01

TransactionsperMinute(TPMs)andTransactionsTransactionResponseTimefortheOLTPbenchmarkon thevirtualplatformisshowninFigure3.

Oracle10gonHyperV

Page7of36

TuneRightRunFast

Figure3SwingBenchFullOLTPTransactionsperMinute(TPMs)andTransactionResponseTimeonHyperV01

Theresultsachievedonthephysicalplatform(Physica01)forthefullOLTPtestsreflectslightlybetter numbersforCPUandMemoryutilizationandforTPMsandTPSs.

Oracle10gonHyperV

Page8of36

TuneRightRunFast

Browse-Only Test Results


ThesummaryresultsoftheBrowseOnlyOLTPtestsareshowninTable3.
Application: Benchmark Scenario HyperV01 Physical01 SwingBench Order Entry Browse-Only Transaction Mix (4 CPUs) Total Avg. Memory Average Concurrent CPU Storage Utilization Swap TPMs Users Utilization Utilization (4GB SGA) Achieved Utilization 50 15% 64% / 74% 43% 0% 48,463 50 10% 66% / 78% 42% 0% 47,148

Max TPMs Achieved 51,196 52,290

Average TPSs Achieved 844 819

Max TPSs Achieved 876 891

Table3SwingBenchBrowseOnlyTestResultsonHyperV01

TheBrowseOnlytestutilizedonly15%ofCPUand43%ofavailablememoryonthevirtualplatform (HyperV01)asshowninFigure4.

Oracle10gonHyperV Page9of36

TuneRightRunFast

Figure4SwingBenchBrowseOnlyTestResourceOverviewonHyperV01

Figure5presentsanoverviewoftheBrowseOnlybenchmarkonthevirtualplatform,whichincludes theaverageandmaximumTransactionsperMinute(TPMs)andTransactionsperSecond(TPSs).

Figure5SwingBenchBrowseOnlyBenchmarkTestOverviewonHyperV01

TransactionsperMinute(TPMs)andTransactionsTransactionResponseTimefortheBrowseOnly benchmarkonthevirtualplatformisshowninFigure6.

Oracle10gonHyperV

Page10of36

TuneRightRunFast

Figure6SwingBenchBrowseOnlyTransactionsperMinute(TPMs)andTransactionResponseTimeonHyperV01

Onceagain,theresultsachievedonthephysicalplatform(Physica01)fortheBrowseOnlytestsreflect slightlybetternumbersforCPUandMemoryutilization.However,thenumbersforAverageTPMsand TPSsarebetterforthevirtualplatformwhenrunningtheBrowseOnlyscenario. (notethattheBrowseOnlybenchmarkincludejusttheBrowseProductsandBrowseOrderstestsin theTransactionResponseTimegraph)


Oracle10gonHyperV Page11of36

TuneRightRunFast

Conclusions
FromtheanalysisofthefullOLTPtests,thefollowingwasobserved ThedifferenceinAverageTPMsAchievedbetweenHyperV01andPhysical01was1%. ThedifferenceinAverageTPSsAchievedbetweenHyperV01andPhysical01was2%. ThedifferenceinMaxTPMsAchievedbetweenHyperV01andPhysical01was5%. ThedifferenceinMaxTPSsAchievedbetweenHyperV01andPhysical01was9%.

FromtheanalysisoftheBrowseOnlyOLTPtests,thefollowingwasobserved ThedifferenceinAverageTPMsAchievedbetweenHyperV01andPhysical01was3%. ThedifferenceinAverageTPSsAchievedbetweenHyperV01andPhysical01was3%. ThedifferenceinMaxTPMsAchievedbetweenHyperV01andPhysical01was2%. ThedifferenceinMaxTPSsAchievedbetweenHyperV01andPhysical01was2%.

ThepositivepercentagedifferencesfortheAverageTPMsandTPSsachievedindicateaslightadvantage forthephysicalmachineplatformforthefullOLTPtests. The3%differencesachievedontheAverageTPMandTPSfortheBrowseOnlytestsshowthatthe averagesachievedonHyperV01weresuperiortothatachievedonPhysical01. Analysisoftheoverallresultsachievedleadtothefollowingconclusions. The HyperV virtual machine Oracle 10g database was able to provide an almost identical performance to the Oracle 10g database running on the physical database server. This clearly demonstratesthataHyperVvirtualenvironmentcouldsustaintheperformancelevelsrequiredin amultiserverorganizationwhileofferingaconsiderablesavingsintermsofhardwareinvestment. HyperVguestvirtualmachinesarelimitedtoamaximumoffourCPUcores;therefore,youshould runOracle10gwithinHyperVguestvirtualmachinesonlyifyourworkloadperformancecanbe satisfiedbynomorethanfourCPUs. When compared against native configurations with comparable hardware resources, the same throughput can be achieved within a guest virtual machine at a cost of slightly increased CPU utilization. Proper hardware sizing is critical to Oracle 10g performance. You should ensure that cumulativephysicalCPUresourcesonaserverareadequatetomeettheneedsoftheguestvirtual machinesbytestingyourworkloadintheplannedvirtualizedenvironment. Theinformationcaptured sofarisspecifictoperformanceconsiderations;foryourdeployment, takefunctionalconsiderations(i.e.,supportedconfigurations,optionstoachievehighavailability, andsoon)alsointoaccount. Forconsolidationscenarios,theamountofstorageresourcesavailableaswellasthescenariowill drive your decision. You should size your storage with your workload and response time requirements in mind. Always follow best practices with respect to the underlying storage in HyperVenvironments,justasyouwouldwithanyOracle10gdeployment.
Page12of36

Oracle10gonHyperV

TuneRightRunFast

The results achieved in these tests clearly demonstrate that the Oracle 10g Database, running on the Microsoft Server 2008 operating system, will deliver an almost identical performance regardless of whethertheunderlyingplatformisaphysicalserveroraHyperVvirtualmachine.

Oracle10gonHyperV

Page13of36

TuneRightRunFast

Testing Environment
The testing environment consisted of 2 Dell PowerEdge 2900 servers connected to a Dell PowerVault MD3000i SAN via an iSCSI interface. The MD3000i contained 2 shelves of 15 x 145GB drives. Each shelf wasconnectedto1PE2900througharedundantsetofDellPowerConnect5424networkswitches.One PE2900serverwasconfiguredwithaHyperVvirtualmachinewhiletheotherserverwasconfiguredto operateasastandalonebox.ADellOptiPlex755workstationwasusedtoaccesstheOracledatabaseon eachserverinaclientserverconfiguration. ThelabsetupisdepictedinFigure7.

1. 2. 3. 4. 5. 6. StandaloneHostservers(DellPowerEdge2900s) IPSAN(dualGigabitn/wswitches(DellPowerConnect5424s) Ethernetmanagementport(2) MD3000iRAIDEnclosure(dualcontroller) Corporate,publicorprivatenetwork DellOptiPlexClientworkstation


Figure7LabHardwareConfigurationOverview

Formoreinformationaboutthehardwarethatwasusedforthesetests,seeAppendixC.

Oracle10gonHyperV

Page14of36

TuneRightRunFast

Hyper-V Configuration Considerations


TheHyperVvirtualizationenvironmentrequirestheuseofspecifichardware. Useaserverprocessorthatsupportshardwareassistedvirtualization.Therearetwotochoose from: o IntelVT o AMDvirtualization(AMDV) EnsurethathardwareassistedvirtualizationandDataExecutionPrevention(DEP)arepresentand enabled.(YoucanverifythisintheBIOSsetting.) RuntheHyperVserverroleontherootpartitiononlyoftheWindowsoperatingsystem. Setanydisksthatwillbeconfiguredaspassthroughdisksfortheguestvirtualmachineas offlineintherootpartitionusingDISKPARTorVolumeManager. Insurethattheintegrationcomponents(enlightenments)areinstalledontheguestvirtual machine. Useaphysicalnetworkadapterinsteadofaemulatednetworkadapterwhenconfiguring networkingforthevirtualmachine. Avoidemulateddeviceswhenpossible.ThesedevicescanresultinsignificantlymoreCPU overheadwhencomparedtophysicaldevices.

Hyper-V Storage Considerations


HyperVsupportsseveraldifferenttypesofstorageoptions.Eachofthestorageoptionscanbeattached via an IDE or SCSI controller. For the RAW devices used for Oracle 10g ASM, we used the virtual SCSI controller configuration option. For an I/O intensive application such as Oracle, it is recommended that youlimityourchoicestothetwobestperformingoptions: Passthroughdisk FixedsizedVirtualHardDisks(VHDs)

Dynamic VHDs are not recommended for performance reasons. This is because for dynamic VHD, the blocks in the disk start as zeroed blocks, but they are not backed by any actual space in the file. Reads from such blocks return a block of zeros. When a block is first written to, the virtualization stack must allocatespacewithintheVHDfilefortheblockandthenupdatethemetadata.Inadditiontothis,every timeanexistingblockisreferenced,theblockmappingmustbelookedupinthemetadata.Thisincreases both the number of disk I/Os for read and write activities and CPU usage. The dynamic growth also requirestheserveradministratortomonitordiskcapacitytoensurethatthereissufficientdiskstorageas thestoragerequirementsincrease.FixedsizeVHDscanbeexpandedifneeded,butthisrequiresthatthe guestvirtualmachinebeshutdownduringtheoperation.1 Both fixedsized VHD and passthrough storage configurations were used for the VM machine setup for this paper. The fixedsized VHD was used for the OS and Oracle binary installation. The passthrough

RunningSQLServer2008inaHyperVEnvironmentBestPracticesandPerformanceRecommendations October2008byLindseyAllen,MikeRuthruff,andPremMehra
Oracle10gonHyperV Page15of36

TuneRightRunFast

diskswereconfiguredasRAWdevicesforusebytheOracleASMinstance.SyntheticSCSIcontrollerswere usedfortheguestvirtualmachines.

Hardware Configuration
Database Servers Physical01wasconfiguredasastandalonephysicalmachine. Physical02wasconfiguredtosupportasingleVM(HyperV01). Bothserversconsistedoftheexactsamehardwareconfiguration. EachserverwasconnectedtoasingleshelfofthePowerVaultMD3000iviaaniSCSIinterface. EachshelfoftheMD3000icontained15x145GBdiskconfiguredasfollows: 6x145GB(RAID1+0) 2x200GBLUNsconfiguredasRAWdevicesforusebyASM 6x145GB(RAID1+0) 2x200GBLUNsconfiguredasRAWdevicesforusebyASM 2x145GB(RAID1) configuredasfollows: Physical01 Physical02 1x140GB 1x40GBLUN (AppsOSandOraclebinaries) (AppsOSandOraclebinaries) 1x100GBLUN (VMsVMdefinitionfiles) SeeAppendixCforthehardwarespecificationforeachPowerEdge2900databaseserver. Client Workstation ADellOptiPlex755workstationwasutilizedastheclientworkstation.ThismachinewasnamedOPT3. SeeAppendixCforthehardwarespecificationfortheOptiPlex755workstation.

Software Configuration
OS Configuration Both the Physical02 and Physical01 servers were installed with the Windows 2008 Server Enterprise Editionx64SP1operatingsystem.AllcurrentMicrosoftOSupdateswereinstalled.TheMicrosoftiSCSI initiatorwasusedtoconfigureaccesstothe4x200GBLUNspresentedfromtheMD3000iSAN. TheOptiPlex755workstationwasconfiguredwiththeMicrosoftWindowsVistaBusinessServicePack1 32bitoperatingsystem.AllcurrentMicrosoftOSupdateswereinstalled.

Oracle10gonHyperV

Page16of36

TuneRightRunFast

HyperVsetup
TheHyperV01virtualmachinewascreatedonPhysical02usingthestepsoutlinedintheHyperVGetting Started Guide. Since it was the only VM running on Physical02, HyperV01 was allocated 14.0GB of memoryand4virtualCPUs.TheattributesfortheHyperV01virtualmachineareshowninFigure10.

Figure8HyperVconfigurationattributesfortheHyperV01virtualmachine

TheIDEharddrivewasconfiguredasafixedsizedVHDfromPhysical02andsizedat20GB.The4x200GB LUNsfromtheMD3000iwereconfiguredaspassthroughdisksfromPhysical02toHyperV01.Thesedisks wereconfiguredasRAWdevicesforusebyOracleAutomaticStorageManagement(ASM).

DatabaseServers
In order to achieve an apples to apples comparison between the VM and the physical database server(Physical01),thebcdeditutilitywasusedtoaltertheconfigurationoftheWindowsbootloaderon Physical01 to reduce the amount memory available for use by 2GB and to reduce the number of processorsavailableby4.ThismadethePhysical01serverconfigurationthesameastheHyperV01server configuration:14GBmemoryand4processors. ThefollowingcommandswereusedtomodifytheWindows2008Serverbootloader:
Oracle10gonHyperV Page17of36

TuneRightRunFast

bcdedit /set removememory 2048 bcdedit /set Physical01 numproc 4 bcdedit /enum all /v

##hide2GBofmemoryfromWindows ##setsthenumberofprocessorstouse ##showallentries

TheWindowsbootloaderconfigurationforthePhysical01serverisshownbelow:

Windows Boot Loader ------------------identifier device path description locale inherit osdevice systemroot resumeobject nx removememory numproc

{35a34bec-90a1-11dd-a8b4-00151786b52d} partition=C: \Windows\system32\winload.exe Microsoft Windows Server 2008 en-US {6efb52bf-1766-41db-a6b3-0ee5eff72bd7} partition=C: \Windows {35a34bed-90a1-11dd-a8b4-00151786b52d} OptOut 2048 4

TheIOMeterutilitywasusedtomeasuretheI/OthroughputfortheiSCSIattachedLUNs.Thefollowing resultswereachievedonbothHyperV01andPhysical01: ~2400IOPs ~54mslatency 1.76%CPUused IOPs Input/Outputoperationspersecond Latency timedelaybetweenthemomentsomethingisinitiatedandthemomentitsfirsteffectbegins TheIOMeterresultsverifiedthatbasicI/OfortheiSCSIdeviceswasthesameforboththephysicaland virtualplatformconfigurations. Oracle Configuration OracleDatabase10gRelease2(version10.2.0.4.0)EnterpriseEditionforMicrosoftWindowsVistax64and MicrosoftWindowsServer2008x64wasinstalledonthePhysical01physicalmachineandtheHyperV01 virtualmachine.Eachmachinehad4iSCSIdevices(LUNs)at200GBeachinsizeattachedfromseparate shelvesoftheMD3000iSAN.ThesedeviceswereconfiguredasRAWdevicesforusebytheASMinstance. TheOracleASMlibrarydriverwasusedtolabeleachdeviceasanavailablecandidatediskforusebyASM. The Database Configuration Assistant (DBCA) was used to create the ASM instance and the Oracle 10g database on each machine. The Oracle database on each machine was configured with the same parameterspecifications.SeeAppendixDforalistofparameterspecificationsusedforeachdatabase.

Oracle10gonHyperV

Page18of36

TuneRightRunFast

Eachdatabasewasconfiguredfora4.0GBSGAwitha1.0GBPGAtarget.Assuch,theWindowsServer 2008 OS was configured to support Windows Large Pages. This is a recommended Oracle best practice whentheOracleSGAissizedat4.0GBorgreater.ThestepsforconfiguringWindowsLargePagesupport aredescribedinAppendixE. Oracle Database 10g Client Release 2 (version 10.2.0.3.0) for Microsoft Windows Vista and Microsoft Windows Server 2008 (32bit) was installed on the OPT3 client workstation. Oracle Net Services was configuredtouseTCPoverthe default TNSportto accesstheDBPHYSandDBVM01databasesoneach databaseserver. SwingBench Configuration ThetoolusedtoperformthebenchmarktestswasSwingBench.SwingBenchisasetofbenchmark/test/ demo Java based programs originally developed by Dominic Giles of the Oracle U.K Database Solutions groupforOracleRealApplicationClusters.AlthoughitisnotofficiallysupportedbyOracle,SwingBenchis freelyavailableviadownloadfromhere. SwingBenchsupportsthreedifferentschemas:CallingCircle,OrderEntry,andSalesHistory.TheCalling Circle schema is designed as a simple OLTP test, usually used for single node tests. The Sales History schema is a DSS (Data Warehouse) benchmark tool. The Order Entry schema emulates a classic TPCC OLTPbenchmark,andisdesignedtoworkwithOracleRealApplicationClusters.TheOrderEntryschema fromSwingBenchv2.3wasusedasthebasisforthebenchmarktestsperformedforthiswhitepaper. SwingBench offers three interfaces for testing from a single client machine. The default SwingBench interface is a Javabased utility that presents rich graphics and an interactive interface. The MiniBench interfaceisasimpleinterfacewithminimalgraphicsthatconservesresourcesontheclientmachine.The CharBenchinterfaceiscompletelycommandlineorientedandpresentsoutputinanxmlfile. The Order Entry TPCC Benchmark Profile consists of 5 functional application areas: New Customer Registration,OrderProducts,ProcessOrders,BrowseProducts,andBrowseOrders.Benchmarktestswere performed using the full OLTP benchmark and with only the Browse functions of the OLTP benchmark. ThedefaultSwingBenchinterfacewasusedforallbenchmarktests. TheSwingBenchv2.3utilitywasinstalledontheOPT3clientmachine.InordertosupporttheSwingBench functionality,Java1.6wasdownloadedandinstalledontheworkstation.TheSwingBenchenvironment batchfilewasupdatedtoreflectthelocationsoftheOracleclientandJavasoftware. Modificationstotheswingbenchenv.batfile:
:: @if not "%ECHO%"=="" echo %ECHO% echo off :: Set the following to reflect the root directory of your Java installation set JAVAHOME=Z:\Program Files\Java\jre1.6.0_07 set SWINGHOME=Z:\swingbench23 set ORACLE_HOME=Z:\Oracle\product\10.2.0\client_1 set ANTHOME=%SWINGHOME%\lib Oracle10gonHyperV Page19of36

TuneRightRunFast

set CLASSPATH=%JAVAHOME%\lib\rt.jar;%SWINGHOME%\lib\mytransactions.jar;%SWINGHOME%\lib\swingbench.jar; :: The following is needed for 10g environments set CLASSPATH=%CLASSPATH%;%ORACLE_HOME%\jdbc\lib\ojdbc14.jar;%ORACLE_HOME%opmn\lib\ons.jar

Once the swingbenchenv.bat file was modified for the OPT3 server, the SwingBench Order Entry wizard was invoked for each database to create the schema objects needed for the benchmark tests. RefertotheSwingBenchdocumentationfordetailsregardingthissetup. TheOrderEntrybenchmarksetupwasdefinedasfollows:
Order Entry Service DBVM01 (virtual machine) DBPHYS (physical machine) Schema Owner soe soe Connection Type OCI OCI Number of Users 50 50 Customer Count 7,194,489 7,194,489

Order Count 3,580,964 3,580,964

The OCI connection type uses internal packages and procedures in the Oracle schema to process the transactions.Thisputstheloadforthetransactionprocessingonthedatabaseserverandnottheclient computerdrivingtheloadgenerator. TheDBVM01servicewasconfiguredaspreferredtotheDBVM01databaseonHyperV01(HyperVvirtual server). TheDBPHYSservicewasconfiguredaspreferredtotheDBPHYSdatabaseonPhysical01(Win2K8physical server). AllservicesareconfiguredforstandardTNSconnectivity. Forconsistency,aWindowsbatchscriptwascreatedtodriveeachSwingBenchbenchmarkruntoinsure thateachbenchmarktestwasperformedwithaconsistentsetofcriteria.Thisscriptwill: dropanyuserschema'sandtablespacesfromapriorrun launchtheOrderEntrydataloadwizardstoloaddataforeachschema launchtheSwingBenchCoordinator launchtheSwingBenchloadgenerators launchtheSwingBenchClusterOverviewmanager ...waitforoperatortoperformthebenchmark dropanyuserschema'sandtablespacesfromapriorrun

TheSwingBenchloadgeneratorswereexecutedfromtheOPT3clientworkstationusingTNSconnectivity tothedatabase.ThisallowedustosimulateanactualclientserverOLTPoperation,aswouldbeseenin anoperationalproductionenvironment.

Oracle10gonHyperV

Page20of36

TuneRightRunFast

Recommendations / Deployment Scenarios2


Recommendations UtilizeeitherpassthroughdisksorfixedVHDsforyourguestvirtualmachinestorage.Theseare thebestoptionforperformance,andtheyshouldprovidethebestresultsforOracleworkloads. DynamicVHDsarenotrecommendedduetoperformancereasons. AvoidusingemulateddevicesandinsteadensurethatintegrationcomponentsforHyperVhave beeninstalledandsyntheticdevicesarebeingusedforI/O,network,andsoon.Syntheticdevices willprovidethebestperformancewithlowestamountofCPUoverhead. Forworkloadsthatmakeheavyuseofnetworkresources,refertotheVirtualizationandNetwork sectionsoftheWindowsPerformanceTuningguideforbestpracticesonoptimizingnetworkfor yourparticularconfiguration.Testtheperformancewithofyourworkload,asworkload characteristicscanvarygreatly.

Theabilitytousesomeofthesetechniqueswilldependonthehardwarecapabilities. Deployment Scenarios HyperVServer2008isagoodsolutionfororganizationsthatwanttoconsolidateinformationonasingle serverorwhohavelowutilizationinfrastructureworkloads,departmentalapplicationsandsimplebranch officeworkloads. Testing and Development HyperV Server 2008 is especially suited to meet testing and development virtualizations needs. Using virtual machines, development staffs can create and test a wide variety of scenarios in a safe, self containedenvironmentthataccuratelyapproximatestheoperationofphysicalserversandclients. Forexample: A development team can test the latest version of an application on multiple platforms with a varietyofvirtualhardwarecapabilities. AnITdepartmentcanusevirtualmachinestotestdeploymentofnewserverandclientfeatures.

ThisisespeciallybeneficialinanOracleenvironment,wherepatchesand/ornewreleasesoftheOracle softwarecansometimesbreakanexistingapplication.

ContentexcerptedfromMicrosoftHyperVServer2008DeploymentScenarios

http://www.microsoft.com/servers/hypervserver/deployment.mspx

Oracle10gonHyperV Page21of36

TuneRightRunFast

Remote Site Virtualization and Consolidation Remotesitesfaceseveralchallengeslikeservervirtualization,andtheneedforremotemanagementdue tolimitedornonexistentlocalITdepartments.Remoteinfrastructuresbenefitfromserverconsolidation. Rather than using multiple small servers, each dedicated to a specific function, such as email services, printservices,faxing,orverticalapplications,thoseserverscanbevirtualizedonasinglemidlevelserver. A singleserver approach with virtual machines taking over for previously dedicated servers also means reduced power requirements, reduced space requirements, and having only one physical server to manage(fromahardwareperspective). Under certain circumstances, Microsoft HyperV Server 2008 provides a flexible and responsive virtualizationsolutionthatenablesorganizationstovirtualizetheirremotesiteinfrastructure.Businesses can consolidate small remote site servers with HyperV Server 2008 to virtualize low utilization infrastructure workloads, departmental applications and simple branch office workloads. For example, HyperVServer2008isagoodsolutionifyourorganizationisconsolidatinglowutilizedservers(file,print, orperhapsalocalreadonlyDCforasmallbranchoffice). HyperV Server 2008 is particularly suited for remote sites because it is a standalone product which leverages the vast set of drivers already built for Windows and provides high performance with less overhead for device virtualization with new IO virtualization architecture. HyperV Server 2008 also enables complete scripted control of virtual machine environments through comprehensive WMI interfaces.Inaddition,HyperVServer2008alsoprovidesremotesiteswithdataprotectionandbackup withitsintegratedVSSsupportforbackup. Repurposing Older Hardware HyperV Server 2008 is especially suited for organizations that are consolidating and decommissioning older hardware who want to consolidate information to extend the hardwares life with better functionality. Microsoft Windows Server 2008 with the HyperV role enabled can run on legacy 64bit hardware(withtherighttypeofCPUandBIOScapabilityseeAppendixB)andHyperVwillthensupport legacy operating systems such as Microsoft Windows Server 2000, Windows Server 2003, and Linux workloads, or workloads virtualized with Microsoft Virtual Server. So, HyperV is a good solution for consolidatinginformationonasinglestandaloneserverofolderhardware.

Oracle10gonHyperV

Page22of36

TuneRightRunFast

Appendix A
Hyper-V Configuration3 HyperVisahypervisorbasedvirtualizationtechnologyforWindowsServer2008.Thehypervisoristhe processorspecificvirtualizationplatformthatallowsmultipleisolatedoperatingsystemstoshareasingle hardwareplatform. HyperVsupportsisolationintermsofapartition.Apartitionisalogicalunitofisolation,supportedbythe hypervisor,inwhichoperatingsystemsexecute.TheMicrosofthypervisormusthaveatleastoneparent, orroot,partition,runningWindowsServer200864bitEdition.Thevirtualizationstackrunsintheparent partitionandhasdirectaccesstothehardwaredevices.Therootpartitionthencreatesthechildpartitions whichhosttheguestoperatingsystems.Arootpartitioncreateschildpartitionsusingthehypercall applicationprogramminginterface(API). Partitionsdonothaveaccesstothephysicalprocessor,nordotheyhandletheprocessorinterrupts. Instead,theyhaveavirtualviewoftheprocessorandruninavirtualmemoryaddressregionthatis privatetoeachguestpartition.Thehypervisorhandlestheinterruptstotheprocessor,andredirectsthem totherespectivepartition.HyperVcanalsohardwareacceleratetheaddresstranslationbetweenvarious guestvirtualaddressspacesbyusinganInputOutputMemoryManagementUnit(IOMMU)which operatesindependentofthememorymanagementhardwareusedbytheCPU.AnIOMMUisusedto remapphysicalmemoryaddressestotheaddressesthatareusedbythechildpartitions. Childpartitionsalsodonothavedirectaccesstootherhardwareresourcesandarepresentedavirtual viewoftheresources,asvirtualdevices(VDevs).Requeststothevirtualdevicesareredirectedeithervia theVMBusorthehypervisortothedevicesintheparentpartition,whichhandlestherequests.The VMBusisalogicalinterpartitioncommunicationchannel.TheparentpartitionhostsVirtualizationService Providers(VSPs)whichcommunicateovertheVMBustohandledeviceaccessrequestsfromchild partitions.ChildpartitionshostVirtualizationServiceConsumers(VSCs)whichredirectdevicerequeststo VSPsintheparentpartitionviatheVMBus.Thisentireprocessistransparenttotheguestoperating system. VirtualDevicescanalsotakeadvantageofaWindowsServerVirtualizationfeature,namedEnlightenedIO, forstorage,networking,graphics,andinputsubsystems.EnlightenedIOisaspecializedvirtualization awareimplementationofhighlevelcommunicationprotocols(suchasSCSI)thatutilizetheVMBus directly,bypassinganydeviceemulationlayer.Thismakesthecommunicationmoreefficientbutrequires anenlightenedguestthatishypervisorandVMBusaware.HyperVenlightenedI/Oandahypervisor awarekernelisprovidedviainstallationofHyperVintegrationservices.Integrationcomponents,which includevirtualserverclient(VSC)drivers,arealsoavailableforotherclientoperatingsystems.HyperV

Thecontentinthisappendixwasexcerptedfromthewhitepaper: RunningSQLServer2008inaHyperVEnvironmentBestPracticesandPerformanceRecommendations October2008byLindseyAllen,MikeRuthruff,andPremMehra


Oracle10gonHyperV Page23of36

TuneRightRunFast

requiresaprocessorthatincludeshardwareassistedvirtualization,suchasisprovidedwithIntelVTor AMDVirtualization(AMDV)technology. Figure11providesahighleveloverviewofthearchitectureofaHyperVenvironmentrunningon WindowsServer2008.

Figure9OverviewofHyperVarchitecture

Acronymsandtermsusedinthediagramabovearedescribedbelow: APICAdvancedProgrammableInterruptControllerAdevicewhichallowsprioritylevelstobe assignedtoitsinterruptoutputs. ChildPartitionPartitionthathostsaguestoperatingsystemAllaccesstophysicalmemoryand devicesbyachildpartitionisprovidedviatheVirtualMachineBus(VMBus)orthehypervisor. HypercallInterfaceforcommunicationwiththehypervisorThehypercallinterface accommodatesaccesstotheoptimizationsprovidedbythehypervisor. HypervisorAlayerofsoftwarethatsitsbetweenthehardwareandoneormoreoperating systems.Itsprimaryjobistoprovideisolatedexecutionenvironmentscalledpartitions.The hypervisorcontrolsandarbitratesaccesstotheunderlyinghardware. ICIntegrationcomponentComponentthatallowschildpartitionstocommunicationwithother partitionsandthehypervisor. I/OstackInput/outputstack MSRMemoryServiceRoutine
Page24of36

Oracle10gonHyperV

TuneRightRunFast

rootpartitionPartitionManagesmachinelevelfunctionssuchasdevicedrivers,power management,anddevicehotaddition/removal.Theroot(orparent)partitionistheonlypartition thathasdirectaccesstophysicalmemoryanddevices. VIDVirtualizationInfrastructureDriverProvidespartitionmanagementservices,virtual processormanagementservices,andmemorymanagementservicesforpartitions. VMBusChannelbasedcommunicationmechanismusedforinterpartitioncommunicationand deviceenumerationonsystemswithmultipleactivevirtualizedpartitions.TheVMBusisinstalled withHyperVIntegrationServices. VMMSVirtualMachineManagementServiceResponsibleformanagingthestateofallvirtual machinesinchildpartitions. VMWPVirtualMachineWorkerProcessAusermodecomponentofthevirtualizationstack. TheworkerprocessprovidesvirtualmachinemanagementservicesfromtheWindows Server2008instanceintheparentpartitiontotheguestoperatingsystemsinthechildpartitions. TheVirtualMachineManagementServicespawnsaseparateworkerprocessforeachrunning virtualmachine. VSCVirtualizationServiceClientAsyntheticdeviceinstancethatresidesinachildpartition. VSCsutilizehardwareresourcesthatareprovidedbyVirtualizationServiceProviders(VSPs)inthe parentpartition.TheycommunicatewiththecorrespondingVSPsintheparentpartitionoverthe VMBustosatisfyachildpartitionsdeviceI/Orequests. VSPVirtualizationServiceProviderResidesintherootpartitionandprovidesyntheticdevice supporttochildpartitionsovertheVirtualMachineBus(VMBus). WinHvWindowsHypervisorInterfaceLibraryWinHvisessentiallyabridgebetweena partitionedoperatingsystemsdriversandthehypervisorwhichallowsdriverstocallthe hypervisorusingstandardWindowscallingconventions WMITheVirtualMachineManagementServiceexposesasetofWindowsManagement Instrumentation(WMI)basedAPIsformanagingandcontrollingvirtualmachines.

Oracle10gonHyperV

Page25of36

TuneRightRunFast

Appendix B
Hardware Requirements4
HyperVrequiresspecifichardware.Youcanidentifysystemsthatsupportthex64architectureandHyper VbysearchingtheWindowsServercatalogforHyperVasanadditionalqualification (seehttp://go.microsoft.com/fwlink/?LinkId=111228). ToinstallandusetheHyperVrole,youwillneedthefollowing: Anx64basedprocessor.HyperVisavailablein64biteditionsofWindowsServer2008 specifically,the64biteditionsofWindowsServer2008Standard,WindowsServer2008 Enterprise,andWindowsServer2008Datacenter.HyperVisnotavailablefor32bit(x86)editions orWindowsServer2008forItaniumBasedSystems.However,theHyperVmanagementtoolsare availablefor32biteditions. Hardwareassistedvirtualization.Thisisavailableinprocessorsthatincludeavirtualization optionspecificallyprocessorswithIntelVirtualizationTechnology(IntelVT)orAMD Virtualization(AMDV)technology. HardwareenforcedDataExecutionPrevention(DEP)mustbeavailableandenabled.Specifically, youmustenableIntelXDbit(executedisablebit)orAMDNXbit(noexecutebit). Tip ThesettingsforhardwareassistedvirtualizationandhardwareenforcedDEPareavailablein theBIOS.However,thenamesofthesettingsmaydifferfromthenamesidentifiedabove. FormoreinformationaboutwhetheraspecificprocessormodelsupportsHyperV,check withthemanufacturerofthecomputer.Ifyoumodifythesettingsforhardwareassisted virtualizationorhardwareenforcedDEP,youmayneedtoturnoffthepowertothe computerandthenturnitbackon.Restartingthecomputermaynotapplythechangesto thesettings. Memory Themaximumamountofmemorythatcanbeusedisdeterminedbytheoperatingsystem,asfollows: ForWindowsServer2008EnterpriseandWindowsServer2008Datacenter,thephysicalcomputer canbeconfiguredwithupto1TBofphysicalmemory,andvirtualmachinesthatruneitherof thoseeditionscanbeconfiguredwithupto64GBofmemorypervirtualmachine. ForWindowsServer2008Standard,thephysicalcomputercanbeconfiguredwithupto32GBof physicalmemory,andvirtualmachinesthatruneitherofthoseeditionscanbeconfiguredwithup to31GBofmemorypervirtualmachine.

Thecontentinthisappendixwasexcerptedfromthewhitepaper: RunningSQLServer2008inaHyperVEnvironmentBestPracticesandPerformanceRecommendations October2008byLindseyAllen,MikeRuthruff,andPremMehra


Oracle10gonHyperV Page26of36

Processors

TuneRightRunFast

HyperVissupportedonphysicalcomputerswithupto24logicalprocessors.Alogicalprocessorcanbea coreprocessororaprocessorusinghyperthreadingtechnology.Youcanconfigureupto4virtual processorsonavirtualmachine.However,thenumberofvirtualprocessorssupportedbyaguest operatingsystemmightbelower. Thefollowingaresomeexamplesofsupportedsystemsandthenumberoflogicalprocessorsthey provide: Asingleprocessor/dualcoresystemprovides2logicalprocessors. Asingleprocessor/quadcoresystemprovides4logicalprocessors. Adualprocessor/dualcoresystemprovides4logicalprocessors. Adualprocessor/quadcoresystemprovides8logicalprocessors. Aquadprocessor/dualcoresystemprovides8logicalprocessors. Aquadprocessor/dualcore,hyperthreadedsystemprovides16logicalprocessors. Aquadprocessor/quadcoresystemprovides16logicalprocessors.

Networking HyperVprovidesthefollowingnetworkingsupport: Eachvirtualmachinecanbeconfiguredwithupto12virtualnetworkadapters8canbethe networkadaptertypeand4canbethelegacynetworkadaptertype.Thenetworkadapter typeprovidesbetterperformanceandrequiresavirtualmachinedriverthatisincludedinthe integrationservicespackages. EachvirtualnetworkadaptercanbeconfiguredwitheitherastaticordynamicMACaddress. Eachvirtualnetworkadapteroffersintegratedvirtuallocalareanetwork(VLAN)supportandcan beassignedauniqueVLANchannel. Youcanhaveanunlimitednumberofvirtualnetworkswithanunlimitednumberofvirtual machinespervirtualnetwork. Note Youcannotconnectavirtualnetworktoawirelessnetworkadapter.Asaresult,you cannotprovidewirelessnetworkingcapabilitiestovirtualmachines. Storage HyperVsupportsavarietyofstorageoptions.Youcanusethefollowingtypesofphysicalstoragewitha serverthatrunsHyperV: Directattachedstorage:YoucanuseSerialAdvancedTechnologyAttachment(SATA),external SerialAdvancedTechnologyAttachment(eSATA),ParallelAdvancedTechnologyAttachment (PATA),SerialAttachedSCSI(SAS),SCSI,USB,andFirewire.
Page27of36

Oracle10gonHyperV

TuneRightRunFast

Storageareanetworks(SANs):YoucanuseInternetSCSI(iSCSI),FibreChannel,andSAS technologies. Networkattachedstorage

Youcanconfigureavirtualmachinetousethefollowingtypesofvirtualstorage. Virtualharddisksofupto2040GB.Youcanusefixedvirtualharddisks,dynamicallyexpanding virtualharddisks,anddifferencingdisks. VirtualIDEdevices.Eachvirtualmachinesupportsupto4IDEdevices.Thestartupdisk (sometimesreferredtoasthebootdisk)mustbeattachedtooneoftheIDEdevices.Thestartup diskcanbeeitheravirtualharddiskoraphysicaldisk. VirtualSCSIdevices.Eachvirtualmachinesupportsupto4virtualSCSIcontrollers,andeach controllersupportsupto64disks.Thismeansthateachvirtualmachinecanbeconfiguredwithas manyas256virtualSCSIdisks. Physicaldisks.Physicaldisksattacheddirectlytoavirtualmachine(sometimesreferredtoas passthroughdisks)havenosizelimitationotherthanwhatissupportedbytheguestoperating system. Virtualmachinestoragecapacity.Usingvirtualharddisks,eachvirtualmachinesupportsupto 512TBofstorage.Usingphysicaldisks,thisnumberisevengreaterdependingonwhatis supportedbytheguestoperatingsystem. Virtualmachinesnapshots.HyperVsupportsupto50snapshotspervirtualmachine. Note AlthoughavirtualmachinemustuseavirtualIDEdeviceasthestartupdisktostartthe guestoperatingsystem,youhavemanyoptionstochoosefromwhenselectingthe physicaldevicethatwillprovidethestorageforthevirtualIDEdevice.Forexample,you canuseanyofthetypesofphysicalstorageidentifiedintheprecedinglist.

Oracle10gonHyperV

Page28of36

TuneRightRunFast

Appendix C
Hardware Configuration AdescriptionofthehardwareusedforthiswhitepaperispresentedinTable4. Processor Cache Memory HBA Server DellPowerEdge2900 (2servers) OS Network (2)4socketquadcoreIntel2.85GHz,1333MHzbus 64KBL2primarymemorycache 16GBphysicalmemory 2x4Gb/sdualportEmulex WindowsServer2008Enterprise(x64) 2xBroadcomBCM5708CNetXtremeIIGigE 4xIntel(R)PRO/1000PTDualPortServerAdapter 1xMicrosoftVirtualNetworkSwitchAdapter 2x73GBinternalDrivesRaid1 OracleDatabase10gR2EnterpriseEditionx8664 215x145GBeach(oneshelftoeachPE2900server) 6xdisks(RAID1+0)2x200GBLUNs 6xdisks(RAID1+0)2x200GBLUNs 2xdisks(RAID1) 1x40GBLUN(OS) 1x100GBLUN(VMdefinitionfiles) IntelCore2Duo2.67GHz,1333MHzbus 64KBL2primarymemorycache 4MBsecondarymemorycache 2014MBphysicalmemory WindowsVistaBusinessServicePack1 Intel(R)82566DM2GigabitNetworkConnection 1x80GBinternaldrive

Storage Software Shelves Data Storage DellPowerVault MD3000i Archive OS

Processor Cache Memory OS Network Storage Software

Workstation DellOptiPlex755

OracleDatabase10gR2Client SwingBenchv2.3 Table4Oracle10gHyperVLabHardwareConfiguration TheoperatingsystemwasconfiguredthesamewayonboththePE2900s(Physical01andPhysical02).A singlevirtualmachine(HyperV01)wascreatedonPhysical02.TheMemoryandCPUconfigurationofthe Physical01physicalmachinewasadjustedtomatchtheMemoryandCPUconfigurationofHyperV01.


Oracle10gonHyperV Page29of36

TuneRightRunFast

Appendix D
Oracle Database Configuration TheOracledatabasesonboththePhysical01physicalmachineandtheHyperV01virtualmachinewere configuredwitha4.0GBSGA(SystemGlobalArea). Table5liststhenondefaultparametervaluesfortheDBPHYSdatabaseonthePhysical01physicalserver.
Name audit_file_dest background_dump_dest compatible control_files Parameter Value F:\ORACLE\PRODUCT\10.2.0\ADMIN\DBPHYS\ADUMP F:\ORACLE\PRODUCT\10.2.0\ADMIN\DBPHYS\BDUMP 10.2.0.3.0 +DATADG/dbhpv2/controlfile/current.256.667653675, +ARCHIVEDG/dbhpv2/controlfile/current.256.667653675 core_dump_dest F:\ORACLE\PRODUCT\10.2.0\ADMIN\DBPHYS\CDUMP db_block_size 8192 db_create_file_dest +DATADG db_create_online_log_dest_1 +DATADG db_create_online_log_dest_2 +ARCHIVEDG db_domain LAB02.local db_file_multiblock_read_count 16 db_name DBPHYS db_recovery_file_dest +ARCHIVEDG db_recovery_file_dest_size 400G dispatchers (PROTOCOL=TCP) (SERVICE=DBPHYSXDB) job_queue_processes 10 log_archive_dest_1 LOCATION=+ARCHIVEDG/ log_archive_format ARC%S_%R.%T open_cursors 300 pga_aggregate_target 1G processes 600 remote_login_passwordfile EXCLUSIVE sessions 665 sga_target 4G spfile +DATADG/dbhpv2/spfiledbhpv2.ora undo_management AUTO undo_tablespace UNDOTBS1 user_dump_dest F:\ORACLE\PRODUCT\10.2.0\ADMIN\DBPHYS\UDUMP Table5DBPHYSdatabaseparametersonphysicalmachinePhysical01

Oracle10gonHyperV

Page30of36

TuneRightRunFast

Table6liststhenondefaultparametervaluesfortheDBVM01databaseontheHyperV01virtualserver.
Name audit_file_dest background_dump_dest compatible control_files Parameter Value C:\ORACLE\PRODUCT\10.2.0\ADMIN\DBVM01\ADUMP C:\ORACLE\PRODUCT\10.2.0\ADMIN\DBVM01\BDUMP 10.2.0.3.0 +DATADG/dbvm01/controlfile/current.256.667668991, +ARCHIVEDG/dbvm01/controlfile/current.256.667668991 core_dump_dest C:\ORACLE\PRODUCT\10.2.0\ADMIN\DBVM01\CDUMP db_block_size 8192 db_create_file_dest +DATADG db_create_online_log_dest_1 +DATADG db_create_online_log_dest_2 +ARCHIVEDG db_domain LAB02.local db_file_multiblock_read_count 16 db_name DBPHYS db_recovery_file_dest +ARCHIVEDG db_recovery_file_dest_size 400G dispatchers (PROTOCOL=TCP) (SERVICE=DBPHYSXDB) job_queue_processes 10 log_archive_dest_1 LOCATION=+ARCHIVEDG/ log_archive_format ARC%S_%R.%T open_cursors 300 pga_aggregate_target 1G processes 600 remote_login_passwordfile EXCLUSIVE sessions 665 sga_target 4G spfile +DATADG/dbvm01/spfiledbvm01.ora undo_management AUTO undo_tablespace UNDOTBS1 user_dump_dest C:\ORACLE\PRODUCT\10.2.0\ADMIN\DBVM01\UDUMP Table6DBVM01databaseparametersonvirtualmachineHyperV01

Bothdatabaseswereconfiguredwithexactlythesamesettings.BothWindowServer2008operating systemswereconfiguredtosupportWindowsLargePages.

Oracle10gonHyperV

Page31of36

TuneRightRunFast

Appendix E
How to Configure the Windows OS for Large Page Support
Large-Pages in Windows AswithLinux,largepagescanbeallocatedinWindows.UnlikeLinuxwhereyouallocatethepagesinthe OS,withWindows,youconfigureOracleorSQLServertousethelargepagesandtheyallocatedthem. Large Page Support LargepagesupportisafeatureofOracleDatabase10gRelease1(10.1)orlater.Itprovidesaperformance boost for memoryintensive database instances. By taking advantage of newly introduced operating system support, Oracle Database 10g Release 1 (10.1) or later can now make more efficient use of processormemoryaddressingresources.Specifically,whenlargepagesupportisenabled,theCPUsinthe systemwillbeabletoaccesstheOracleDatabasebuffersinRAMmorequickly.Insteadofaddressingthe buffersin4KBincrements,theCPUsaretoldtouse4MBpagesizeswhenaddressingthedatabasebuffers. This feature is particularly useful when the Oracle buffer cache is several gigabytes. Smallersized configurationswillstillseeagainwhenusinglargepages,butthegainwillnotbeasgreataswhenthe databaseisaccessinglargeamountsofmemory. Toenablelargepagesupport,thesystemadministratormustgrantthe"Lockpagesinmemory"privilege totheoracleuser.ThisprivilegeisnotenabledbydefaultwhenWindowsisinstalled. Tograntthisprivilege: ChooseStart > Settings > Control Panel. TheControlPanelwindowopens. DoubleclickAdministrative Tools. DoubleclickLocal Security Policy. IntheleftpaneoftheLocalSecuritySettings window,expandLocal Policiesandselect User Rights Assignment. IntherightpaneoftheLocalSecuritySettings window,selectLock pages in memoryand chooseAction > Security... ClickAdd... SelecttheoracleuserfromtheNamelist. ClickAdd. TheAdministrativeToolswindowopens. TheLocalSecuritySettingswindowopens

TheLocalSecurityPolicySettingdialog opens. TheSelectUsersorGroupsdialogopens.

ClickOKtoclosetheSelectUsersorGroupsdialog. ClickOKtoclosetheLocalSecurityPolicySetting dialog. TotakeadvantageoflargepagesonWindowsServer2003/2008,theamountofphysicalmemorymustbe greaterthantheamountofSystemGlobalArea(SGA)specifiedintheparameterfile.


Oracle10gonHyperV Page32of36

TuneRightRunFast

Largepagesmaynotbeallocatedatalltimesduringinstancestartup;eitheralloftheSGAisallocated usinglargepagesorallofSGAisallocatedusingregularpages. Note: LargepageusagelockstheentireSGAintophysicalmemory. Physicalmemoryisnotreleasedduringashrinkoperation. SeeAlso:Youroperatingsystemdocumentationforrestrictionsonallocatinglargepages. To enable large page support: 1. GotoORACLE_BASE\ORACLE_HOME\bin\oracle.key. 2. Openthefileoracle.keyinatexteditorandrecordthevaluefound. ItissetbytheOracleUniversalInstaller.Thedefaultis:SOFTWARE\ORACLE\KEY_HOME_NAME Ex: 3.
C:\> regedit SOFTWARE\ORACLE\KEY_OraDb10g_home1 SOFTWARE\ORACLE\KEY_OraDb10g_home1

StartRegistryEditoratthecommandprompt:

Note: AlthoughtheRegistryEditorletsyouviewandmodifyregistrykeysand parametervalues,younormallyarenotrequiredto doso.Infact,you can render your system useless if you make incorrect changes. Therefore,onlyadvancedusersshouldedittheregistry! Backupyoursystembeforemakinganychangesintheregistry. 4. GotoHKEY_LOCAL_MACHINE. Findthekeycorrespondingtothevaluefoundinoracle.key. Inthedefaultcase,forexample,youwouldlookfor:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HOME_NAME

5. Createoneofthefollowing,dependingonwhereyouwanttoenablelargepagesupport: (newstringvalue)
ORA_LPENABLE=1toenablelargepagesupportonallinstances ORA_SID_LPENABLE=1toenablelargepagesupportonaspecificinstance

6. ExittheRegistryEditor. BydefaultOracleallocatestheminimumavailablelargepagesizewhenusinglargepages.The minimumavailablelargepagesize,16MB,isobtainedbyusingtheGetLargePageMinimum function.

Oracle10gonHyperV

Page33of36

Caution:

TuneRightRunFast

Do not set the initialization parameter lock_sga when large pages are enabled.LargepageusagelockstheentireSGAintophysicalmemory.When used with parameter lock_sga, database startup fails with an error because the operating system automatically locks. That is, it prevents memoryfrombeingpagedtodiskwhenlargepagesarerequested.Physical memoryisnotreleasedduringashrinkoperation.

Oracle10gonHyperV

Page34of36

TuneRightRunFast

References
WindowsServer2008ProductOverview http://www.microsoft.com/windowsserver2008/en/us/overview.aspx HyperVGettingStartedGuide http://technet.microsoft.com/enus/library/cc732470.aspx LeverageVirtualization http://msdn.microsoft.com/enus/library/bb852231.aspx VirtualizationandConsolidationwithHyperV http://www.microsoft.com/windowsserver2008/en/us/hypervoverview.aspx MicrosoftHyperVServer2008DeploymentScenarios http://www.microsoft.com/servers/hypervserver/deployment.mspx HyperV:UndertheHood May1,2008byChrisWolf http://virtualizationreview.com/features/article.aspx?editorialsid=2477 WhichWindowsServerVirtualization08storageisbestforyou? http://blogs.msdn.com/tvoellm/archive/2007/10/13/whatwindowsservervirtualizationakaviridian storageisbestforyou.aspx StorageoptionsforWindowsServer2008HyperV http://blogs.technet.com/josebda/archive/2008/02/14/storageoptionsforwindowsserver2008s hyperv.aspx MicrosoftHyperV+QLogicHBAs=Performance http://www.qlogic.com/promos/products/hyperv.aspx RunningSQLServer2008inaHyperVEnvironmentBestPracticesandPerformanceRecommendations October2008byLindseyAllen,MikeRuthruff,andPremMehra http://sqlcat.com/whitepapers/archive/2008/10/03/runningsqlserver2008inahypervenvironment bestpracticesandperformancerecommendations.aspx AComparisonofOracleDatabase10gR2RealApplicationClusterPerformanceonMicrosoftWindows 2003ServerEnterpriseEditionx64andRedHatEnterpriseLinuxx8664 October2006byLarryPedigo,PerformanceTuningCorporation. http://www.perftuning.com/pdf/Comparison_Oracle_Windows_Linux.pdf

Oracle10gonHyperV

Page35of36

TuneRightRunFast

OracleDatabaseInstallationGuide10gRelease2(10.2)forMicrosoftWindows(x64) PartNumberB1568104 http://download.oracle.com/docs/cd/B19306_01/install.102/b15681/toc.htm http://download.oracle.com/docs/cd/B19306_01/install.102/b15681.pdf IOmeterProject http://www.iometer.org/ SwingBench2.3.0.391 October2008DominicGiles http://www.dominicgiles.com/swingbench.html http://www.dominicgiles.com/downloads.html OracleDatabase10gRelease2(10.2.0.4.0) Enterprise/StandardEditionforMicrosoftWindowsVistax64andMicrosoftWindowsServer2008x64 http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10204_winx64_vista_ win2k8.html

Oracle10gonHyperV

Page36of36