<Insert Picture Here> Best Practices for Oracle Database 10g RAC on Microsoft 64bit Windows Anu Chawla Philip Newlan Program Manager – Oracle Alliance Principal Product Manager - RAC Anu.Chawla@microsoft.com philip.newlan@oracle.com <Insert Picture Here> Microsoft / Oracle Relationship Commitment to Windows • Oracle7 was the first database to ship on Windows • in 1994 • Windows Server is a base development platform for Oracle • Windows Server is Tier 1 • fully supported platform for Oracle • Focused Engineering and Product management groups for Windows-specific integration projects • Supported both 32-bit and 64-bit Windows Server 2003 on day of O/S release Partnership • Oracle sponsors Microsoft events • (TechEd 2004, 2005, 2006) • Microsoft sponsors Oracle events • OracleWorld, UKOUG 2006,2007 • Oracle RAC Training Sessions at MS Redmond campus • Demos in the ETC • Communication channels open at various levels in the organizations • Joint support contacts for customer escalations • How we jointly solve problems • Conference calls, briefings, etc. Register at Microsoft Oracle Customer Information Center: www.microsoft-oracle.com • Best Practices on running Oracle on Windows Server • Replay and Presentations of Oracle RAC on Windows Server Workshop • Invitations to Global Technical Workshops hosted by Microsoft and Oracle • Certification information for Oracle Applications and technology on Microsoft Platform Oracle on Windows Widely Deployed Oracle Revenues by OS for new license sales Other 2% Unix 49% Windows 29% Linux 20% Source: Gartner Research – May 2005 ID G00127787 State Of The Market? Microsoft Momentum Linux Growth Slows Windows Growth at x86 Pace VAP/VAR Preference Improves Industry Trends • • • Continuum of non-commercial software to commercial integration Broad interoperability movement Competing at the workload level Windows #1 platform for UNIX migrations • • 44% Windows versus 37% Linux Virtualization and consolidation State Of The Market? Microsoft Momentum Linux Growth Slows Windows Growth at x86 Pace VAP/VAR Preference Improves Industry Trends • • • Continuum of non-commercial software to commercial integration Broad interoperability movement Competing at the workload level Windows #1 platform for UNIX migrations • • 44% Windows versus 37% Linux Virtualization and consolidation Oracle 10gR2 RAC User Load Test - Microsoft Windows Server 2003 x64 vs. RHEL 4.0 x86_64 45000 40000 Transactions Per Minute 35000 RHEL AS 4.0 x86_64 Update2, Kernel 2.6.922.0.1.EL.smp 30000 25000 20000 Windows Server 2003 x64 15000 10000 5000 0 0 500 1000 1500 2000 2500 # Users 3000 3500 4000 4500 Load Test Windows 2003 v Red Hat 4.0 (64 bit) • RAC Stress Test (150-250 users) • Transactions Per Minute were up to 16% higher for MS Windows for 150 250 users. • The response times for the “Order Products” test component were up to 50% faster for MS Windows than Linux, and the response times for the “Order Products” component increased substantially above 150 users. • At 250 users, Linux performed over 30% of sorts on disk instead of sorts in memory. • For all of these tests, Linux used 17% - 40% more memory than MS Windows Server. • RAC User Load Tests (2500 – 4500 users) • At 3500 users, the Transactions Per Minute for MS Windows were 18% higher than the Linux Transactions Per Minute. • At 4000 users, MS Windows Server TPM continued to increase while the Linux test failed to complete. • At 2500 users, component response times were 9% - 33% faster for MS Windows Server; while at 3500 users Windows was faster by a wide margin. • For all of these tests, Linux used 5% - 25% more memory than MS Windows Server. Supported 32-bit Architectures • For 32-bit x86 systems • Well-suited for mainstream deployments where 64-bit applications or drivers are unavailable • Most common on servers with 1-4 processors Supported 64-bit Architectures • Gradually replaces 32-bit Windows as mainstream offering • Intended for the most demanding Database and LOB deployments on 8-way+ • Suitable for all workloads • Designed for pure 64-bit software stacks • Well-suited for combining 32bit and 64-bit software 32 bit Vs 64bit Memory Limits General Memory Limits 32-bit 64-bit 4 GB 16 TB 2GB (3 GB if system is booted with /3gb switch) 4GB if compiled with /LARGEADDRESSAWARE 2GB otherwise Not applicable 8 TB Paged Pool 470 MB 128 GB Non-Paged Pool 256 MB 128 GB 1 GB 1 TB 32-bit 64-bit Windows XP Professional 4 GB / 1-2 CPUs 32 GB / 1-2 CPUs Windows Server 2003 Standard Edition 4 GB / 1-4 CPUs 32 GB / 1-4 CPUs Windows Server 2003 Enterprise Edition 64 GB / 1-8 CPUs 1 TB / 1-8 CPUs Windows Server 2003 Datacenter Edition 64 GB / 1-32 CPUs 1 TB / 1-64 CPUs Total Virtual Address Space Virtual Address Space per 32-bit process Virtual Address Space per 64-bit process System Cache Physical Memory and CPU Limits1 (1) Product names listed are for general reference only and do not reflect actual product names. 64-bit Windows Server Standard Edition will be available for x64 only. Architecture – Thread and Memory Model 32bit Windows Oracle process SGA 2GB Background and foreground threads Code SGA contains db buffers, log buffers shared pool, other memory allocations Each thread consists of PGA, stack, other memory allocations Architecture – Thread and Memory Model 64bit Windows Oracle process SGA 8TB Background and foreground threads Code SGA contains db buffers, log buffers shared pool, other memory allocations Each thread consists of PGA, stack, other memory allocations <Insert Picture Here> Oracle Support for MS Windows Windows 32-bit Platform Support OS 9iR2 10gR1 10gR2 Windows 2000 Yes Yes Yes Windows XP Professional Yes Yes Yes Windows Server 2003 Yes Yes Yes Windows 64-bit Platform Support OS 9iR2 10gR1 10gR2 64-bit Windows Server 2003 for Itanium (64-bit DB) Yes Yes Yes 64-bit Windows XP & Windows Server 2003 on x64 (64-bit DB) No Dev Release Yes (May 04) 64-bit Windows XP & Windows Server 2003 on x64 (32-bit DB) Yes (client only) Yes (client only) Yes (client only) 32-bit Windows XP & Windows Server 2003 on x64 (32-bit DB) Yes Yes Yes Windows Vista Support • Next Major Database Release • • • 32-bit support 64-bit support ( for x64 systems) 10gR2 • • Plan to certify and support 32-bit Client and Server Latest Patchset plus possible patches – exact requirements will be documented when certification is completed and announced <Insert Picture Here> Oracle Architecture Database Architecture Process and Memory • Thread model, not a straight port of Oracle’s process architecture • 3GB (32-bit) or 8TB (64-bit) maximum memory per database instance. VLM support allows >3GB on 32-bit. • Runs as a Windows service process • No limits on memory, connections, resources except those imposed by the operating system • What does 8GB Process Address space give you ? • Connections • Datawarehousing improvements Database Architecture File I/O • Oracle10g supports asynchronous I/O to all types of files • Logical and physical raw files and partitions are fully supported (faster than NTFS) • Full 64-bit file I/O internally • No 2GB or 4GB limitations on database file sizes. • Maximum file size is 64GB • Maximum database size is 4 petabytes Dual Core and Hyperthreading • Dual Core support • Supported – Oracle uses the OS scheduler • All versions of Oracle are supported in Hyperthreaded environments. • Hyperthreading • Circuitry added to Intel CPUs resulting in single CPU functioning as 2 CPUs • All versions of Oracle are supported in Hyperthreaded environments. • Customer 10 node RAC • 4 Dual cores with hyperthreading turned on • 16 CPU’s visible in taskmanager on each of 10 nodes • 32GB RAM per node - 200TB database ? <Insert Picture Here> Best Practices for 64 bit Windows Oracle on 64-bit Windows • Long history of supporting 64-bit databases on other platforms • Interoperability between 32-bit clients and 64-bit servers and vice versa • Improved performance, availability and scalability • Why do customers choose to migrate to 64bit Windows ? 64-Bit Best Practices • Run correct 64-Bit version of Oracle for the architecture • 64-Bit Oracle for X64 (AMD or EM64T) • 64-Bit Oracle for Itanium. • 32-Bit Oracle Server not supported on 64-Bit platforms • Enable Large Pages New for Windows Server 2003 SP1 • Large Page support • For instances with large memory requirements, large page support can improve performance • 32 bit – 4kb default – 2MB max • 64 bit – 8kb default – 2MB on x64 -16 MB on IA64 • NUMA support for memory/scheduling • Database intelligently allocates memory and schedules threads based on node configuration • Best Practice: For NUMA on AMD patch to a minimum 10.2.0.2 P5 64-bit: Migration • 32-bit to 64-bit upgrade process is simple • 32-bit data files are compatible with 64-bit DB • No need to recreate the database • Full export and import not required • Database Upgrade Assistant automates process • Transparent migration for end-user applications • No changes required to existing client applications when running against 64bit database File System Best Practices • Use ASM – whether single-instance or RAC – use 10.1.0.4 or higher Provisioning storage when you need it… and save money • • No need to move datafiles around No need to take tablespaces offline Allocate what you need, when you need it Simple to add or remove • Add disks with no downtime Save time and money ASM Disk Group % utilization Ctrl file, redo log, data 1,…data n Where do I locate my datafiles ? • 10g Windows RAC tracked customers 42.9% 2.3% 54.8% ASM OCFS RAW <Insert Picture Here> Management & Diagnostics tools Grid Control Out of the Box Database Control • No client install required • Fully functional after database creation • Discovery, Configuration & Monitoring • Listener • ASM • RAC database Diagnostic Tools - Performance Monitor Process Explorer Tools • OS Tools • MS Tools • • • • • • • diskpart poolmon memsnap tasklist, taskkill tlist (with -c) Driverquery - with /V sc (sc query state= all) • Sysinternals • regmon, filemon, procexp, tcpview • Windows Services for Unix • Oracle Tools • srvctl • crsctl • ocrdump • crs_stat • cluvfy CPU Tuning • Oracle uses all processors available through the OS • ORACLE_AFFINITY registry value can be set to tell Oracle which threads to run on which processors (same setting for all instances) • Thread priorities can be set in the registry using the ORACLE_PRIORITY variable CPU Tuning – Diagnosing High CPU • Process Explorer • drill down to threads • Get thread id of high CPU thread • Use following to map OS Thread Id to Oracle Background Process SELECT a.spid, b.username FROM v$process a, v$session b WHERE a.addr= b.paddr AND a.spid = <thread number> Networking Best Practices • The default queue-size for Windows Server is 50 – increase using QUEUESIZE parameter in LISTENER.ORA – prevents errors during login storms • Use multiple listeners for increased throughput • Increase SDU_SIZE in SQLNET.ORA or TNSNAMES.ORA • Controls SQL*Net packet size • Set to larger SDU size for apps with bulk data transfer (LOBS, Dataguard etc). Perhaps 32k Networking Best Practices • SQLNET.AUTHENTICATION_SERVICES=(NTS) This is a default value in SQLNET.ORA for a reason – it should be left at default. – Required for RAC • In 10.2.x, SQLNET.INBOUND_CONNECT_TIMEOUT defaults to 60 – this may need to be set to 0 in some situations <Insert Picture Here> Installation and Patching Best Practices and Support’s Top Issues Installation Pre-reqs • • • • • • • • • • Hardware is set up correctly Use the Cluster Verification Utility (CVU). User Accounts Remote Desktop Client. Environment Variables Networking Disk Layout Enable Automount Stop ‘troublesome’ Services. Time Sync Install - Remote Desktop Client • If you must use the remote desktop client • Invoke the client with the /console command line parameter Cluster Verification Utility - CVU • CVU checks and reports on varies configuration items at various steps during the install • Does not fix anything ! • Get the latest version from OTN • http://otn.oracle.com/rac - Right Hand Side - CVU • Two steps to run prior to starting install • runcluvfy stage -post hwos -n iwinrca01,iwinrca02 • runcluvfy stage -pre crsinst -n iwinrca01,iwinrca02 • Other steps as required Cluster Verification Utility -pre dbcfg Configures RAC DB -pre dbinst Installs RAC -pre crsinst Installs Oracle Clusterware -pre cfs -post crsinst Sets up OCFS ( OPT ) -post cfs User sets up the Hardware, network & storage -post hwos Most Common Support Issues • Oracle can be installed (and patches applied) over a remote connection. • Try installing on the server console directly, to determine if the problem is with the remote connection utility. • Logging into Windows as a user account, with Admin privs, is not identical as to logging in as the Local Administrator account. If there are problems installing, try using the Local Administrator account. Most Common Support Issues • Files in use errors: • • • Must stop ALL Oracle Services. Stop the DTC (Distributed Transaction Coordinator) service. Use Process Explorer to find the process using the Oracle files. • Problems running catpatch.sql or catcpu.sql: • • Verify there are NO invalid objects in the Database, prior to applying a patch. Verify the Shared_Pool_size and Java_Pool_Size are set to a minimum of 150MB each. • Don’t set ORACLE_HOME in environment – Oracle gets its environment via the Registry. Oracle.key file in OH\bin points to correct registry key. Patching Best Practices • For existing installs, make plans to test and apply future patchsets • Don’t wait until you are forced to apply patch on a production system without sufficient testing • Apply patches within 6 months of release • At minimum, CPU (Critical Patch Update) patches are released quarterly • Fifth-digit patches provided on Windows platforms which bundle one-off patches • For fixing new issues, applying latest patchset and fifth-digit patches available will help in eliminating known bugs <Insert Picture Here> High Availability Solutions on Windows High Availability Solutions • HA becomes essential as databases are critical component of business • HA Goals: Minimize downtime to your company and your customers • Solutions for Windows Environments • • • • • Real Application Clusters (RAC) Oracle Fail Safe Data Guard (DG) Maximum Availability Architecture (MAA) Oracle Clusterware for Single Instance • Provides MSCS – without MSCS • See http://www.oracleracsig.org this Thursday 16th More Information • Windows Server Technology Center • http://otn.oracle.com/windows • Oracle RAC • http://otn.oracle.com/rac • http://otn.oracle.com/asm • Microsoft – Oracle • http://ww.microsoft-oracle.com • Oracle RAC SIG • http://www.oracleracsig.org • For more questions anu.chawla@microsoft.com philip.newlan@oracle.com The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remain at the sole discretion of Oracle.