Oracle Inside Out - Linux vs Windows http://www.interealm.com/technotes/roby/pentmark.html Oracle 9i on Linux vs. Windows 2000 Server By Roby Sherman I recently performed a technical, head-to-head comparison of Oracle 9i release 2 running under out-of-the-box versions of Red Hat Linux 7.2 (kernel 2.4.7-10smp) and Windows 2000 Server Edition, on identical Pentium-based hardware. The goal of these tests was identify the strengths and weaknesses of each operating system in the areas of database performance, stability, and ease of administration / support. Notes on the Hardware, Operating Systems Compared, Etc. Testing was performed on a Compaq DL380 with 1 GB RAM and 2 Pentium III processors with 512K of cache, running at 1.13 Gigahertz. The chassis contained five (5) 18.2 GB Drives hooked to a MegaRAID controlled (although RAID was not used on the disks containing database data files or operating system swap). After each test run was completed, the server disks were wiped of partitioning information, reformatted and re-imaged with the competing operating system with a comparable swap configuration / layout, Oracle software installation, and eventual database configuration and layout. The Linux configuration with ext3 filesystems with journaling enabled. The Windows filesystem used the closest equivalent on it's platform, namely NTFS. Why Not Raw? I've received several questions from readers asking why I preferred to compare filesystems on two different operating systems over a more (in their opinion) "Apples-to-Apples" type comparison via Raw devices. My answer breaks down into two, simple arguments: The code for a given operating system's asynchronous kernel I/O module varies just a much from OS platform to platform as does the direct I/O code for given filesystem implementation. As long as other factors (e.g. filesystem journaling, use of buffering versus direct I/O, equal serialization due to single-file write locks, etc.) are taken into consideration and configured equally for both OS environments, there is really no reason to believe that a comparison of Linux Raw versus Windows Raw would be any more comparable than a comparison of a Linux FS versus Windows NTFS. Regardless of your personal preferences, it's fairly safe to say that a majority of DBAs implementing Oracle databases under Linux- and Windows-based servers are creating their datafiles on the filesystems rather than Raw devices. Given this fact, it made sense to test based on these more prevalent environments. Limitations of the Evaluation Due to hardware resource constraints and a lack of production-ready software, I was unable to evaluate RDBMS performance in a Linux or Windows-based clustering environment or on Itanium-based hardware. It is presently unclear how such configurations would affect the recommendations made in this document. Until such configurations 1 of 4 01.08.2003 13:57 Oracle Inside Out - Linux vs Windows http://www.interealm.com/technotes/roby/pentmark.html can be tested, I cannot and will not make any assumptions or recommendations on operating in such environments. The Performance Tests A series of RDBMS tests were coded to produce a mix of I/O characteristics similar to those found in typical, single instance OLTP, DSS and hybrid environments. These tests were specifically designed to stress the database instance in the areas of: Datafile creation Locally managed and dictionary managed extent management Redo generation (and subsequent LGWR flushing) DBWR block acquisition and flushing during I/O loads and checkpointing Parallel / Bulk DML Parallelized table scans, joins, and intercommunication. Large transactional and query performance against range, hash, and list-partitioned tables Statistics generation and analysis Latch acquirement, sleep/spinning, and release Oracle JVM class loading and general processing PL/SQL execution Shared pool manipulation (shared, parsed SQL, etc.) Sorting and related PGA management Multi-threaded Server (MTS) processing Direct I/O Sequence generation Undo generation and rollback Index block update, splits, and scans Enqueue acquirement, processing, and release Inter-process communication and posting The following bar graph represents key performance areas broken down by specific RDBMS operations and/or tasks: Figure 1. Comparison of Specific RDBMS Functionality As you can see from the graph above, Oracle RDBMS operations tested on Linux performed anywhere between 13%-75% better than they did with an identical Oracle configuration, running under Windows 2000 Server. When all operations were averaged together, Linux showed a general performance advantage of 38.4% over Windows. The Administration Comparison The task of overall database administration was also compared by examining the simplicity and platform consistency in creating and maintaining one or more Oracle database instances in the two operating system environments compared to how these operations are performed today on other mainstream Oracle environments, Sun Solaris and HP-UX. The following table illustrates the Pros and Cons identified during the examination of the two operating platforms: Task Automated Instance Startup and Shutdown (Consistency) 2 of 4 Selected Platform Linux Comments dbstart, dbshut, oratab use similar to Solaris and HP-UX 01.08.2003 13:57 Oracle Inside Out - Linux vs Windows Automated Instance Startup and Shutdown (Simplicity) http://www.interealm.com/technotes/roby/pentmark.html Windows Command-Line Utilities (Consistency, Simplicity) None Initial OS Prep for Database Creation (Consistency) Linux Initial OS Prep for Database Creation (Simplicity) Windows Instance Creation (Consistency, Simplicity) Linux GUI Utilities (Consistency, Simplicity) None OFA-like Implementation and Support Linux Operating System Administration (Consistency) Linux Operating System Administration (Simplicity) Windows Scripting (Consistency, Simplicity) Linux Service and Registry is configured via GUIs to control automatic instance start up and shut down Unlike other Oracle releases, 9i has consistent names for most command-line utilities in Windows and Linux. Procedurally the kernel reconfiguration is slightly different, but the parameters modified and the steps necessary to prep the environment are identical to HP-UX and Solaris. No kernel reconfiguration or relink required. Windows requires a extra step in database creation (and deletion). A Windows Service must be created and maintained via the oradim utility for each database instance on the server. Identical GUIs. "Remote execution" of server-based GUI tools equally troublesome on Windows and Linux. Windows has no support for symbolic links or nested mount points, making OFA implementations on Windows difficult, at best. Not always identical, but certainly closer in heritage to what one would expect in HP-UX and Solaris Windows has more GUI-enabled administrative features than Linux. Scripting options are more robust on the Linux platform and more closely resemble those found on Solaris and HP-UX. Although third-party implementations of KSH are available for Windows, many of them are extremely unstable and exhibit different behaviors compared to their Unix siblings. Environment variable names are also more consistent on Linux than on Windows. (e.g. $TWO_TASK on Windows is called %LOCAL%, etc.) Support for multiple instances within the same Oracle Home (Consistency, Simplicity) None Windows requires multiple registry entries for each Oracle Home. Depending on the Oracle version, the registry tree structure for a given home can be very different. Support for multiple instances with different Oracle Homes (Consistency, Simplicity) Linux Switching homes "gracefully" occurs by running a GUI based switcher. Windows will also use a dynamic home assignment that is formulated when an executable from a particular $ORACLE_HOME is created. 3 of 4 01.08.2003 13:57 Oracle Inside Out - Linux vs Windows http://www.interealm.com/technotes/roby/pentmark.html Comparing Stability Neither Windows 2000 Server nor RedHat Linux 7.2 demonstrated any notable operating system-specific problems for the Oracle RDBMS environments tested in terms of stability; There were no operating-specific ORA-600 internal errors, fatal instance crashes, etc. during its various testing operations. Conclusions and Recommendations From perspective of performance, RedHat Linux 7.2 demonstrated an average performance advantage of 38.4% higher RDBMS throughput than a similarly configured Windows 2000 Server in a variety of operational scenarios. Neither operating system introduced any strange RDBMS operating anomalies, unexplained errors, or crashes during testing. This demonstrated that either platform was well-suited to support a stable Oracle Instance, operating in a variety of conditions. In terms of overall configuration and administration, Windows 2000 Server demonstrated that it could be easier from an overall point-and-click GUI perspective. It was lacking, however, in the ability to support multiple, dissimilar Oracle homes which is critical in order to support even a minimal degree of database stacking. Another point of contention was Window's lack of consistency between many database administrative functions (automated startup, shutdown, service creation, scripting, etc.) compared to what DBAs are already used to in many mainstream UNIX environments (Solaris and HP-UX). RedHat Linux 7.2 is highly recommended for use in non-OPS/RAC Oracle RDBMS installations operating on Pentium-based servers. Windows 2000 Server on Intel-based machines may be used for Oracle databases in environments where there are no current or foreseeable scalability requirements, under the rare circumstance where a windows-based service is required to operate on the same server as the RDBMS itself, or other specific case-by-case situations. 4 of 4 01.08.2003 13:57
© Copyright 2024