48
Comparing Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload (Swingbench 2.2) Oracle 11g Oracle 11g Red Hat Enterprise Linux 5.4 Compared to: Windows Server 2008 Enterprise R2 Intel Xeon X5570 Nehalem Server Intel Xeon X5570 Nehalem Server Version 1.0 November 2009

Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Embed Size (px)

Citation preview

Page 1: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Comparing Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise

OLTP Workload(Swingbench 2.2)

OLTP Workload(Swingbench 2.2)

Oracle 11g Oracle 11g

Red Hat Enterprise Linux 5.4

Compared to:

Windows Server 2008 Enterprise R2

Intel Xeon X5570 Nehalem Server

Intel Xeon X5570 Nehalem Server

Version 1.0November 2009

Page 2: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Comparing Oracle OLTP Performanceon Red Hat Enterprise Linux 5.4 toWindows Server 2008 R2 Enterprise

1801 Varsity DriveRaleigh NC 27606-2072 USAPhone: +1 919 754 3700Phone: 888 733 4281Fax: +1 919 754 3701PO Box 13588Research Triangle Park NC 27709 USA

Linux is a registered trademark of Linus Torvalds. Red Hat, Red Hat Enterprise Linux and the Red Hat "Shadowman" logo are registered trademarks of Red Hat, Inc. in the United States and other countries.

Microsoft, Windows, Windows Server and SQL Server are registered trademarks of Microsoft Corporation.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

Intel, the Intel logo, and Xeon are registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

All other trademarks referenced herein are the property of their respective owners.

© 2009 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, V1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).

The information contained herein is subject to change without notice. Red Hat, Inc. shall not be liable for technical or editorial errors or omissions contained herein.

Distribution of modified versions of this document is prohibited without the explicit permission of Red Hat Inc.

Distribution of this work or derivative of this work in any standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from Red Hat Inc.

The GPG fingerprint of the [email protected] key is:CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E

Page 3: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Table of Contents

1 Executive Summary........................................................................................4

2 Overview: An Oracle OLTP Simulation and Test Tool...................................8 2.1 Testing Software: Swingbench 2.2 .................................................................................8 2.2 Hardware Configuration .................................................................................................9 2.3 Software Configuration..................................................................................................10

2.3.1 RDBMS Software....................................................................................................10 2.3.2 Oracle init.ora parameters......................................................................................10

3 Test Methodology.........................................................................................11 3.1 Swingbench..................................................................................................................11

3.1.1 Memory Resident....................................................................................................11 3.1.2 I/O Constrained iSCSI RAID 5 ...............................................................................11 3.1.3 Improved I/O Fibre Channel RAID 0 ......................................................................11

3.2 Database Creation / Swingbench Set up......................................................................13 3.3 Tuning & Optimizations.................................................................................................16 3.4 RDBMS Tuning..............................................................................................................17

4 Results .........................................................................................................19 4.1 Memory Resident..........................................................................................................19 4.2 I/O Constrained RAID 5 iSCSI .....................................................................................21 4.3 I/O Improved RAID 0 Fibre Channel.............................................................................23

5 Conclusions..................................................................................................25

Appendix A: Oracle DB Creation Scripts and Init.ora Listing............................26

Appendix B: Order Entry Schema:...................................................................28

Appendix C: Red Hat Enterprise Linux 5.4 ISCSI Target Provider Configuration Steps............................................................................................38

Appendix D: Configuration of Fibre Storage on Red Hat Enterprise Linux 5.4 with Multipathing.................................................................................................42

Appendix E: Windows Performance Monitoring Tools.....................................47

3 www.redhat.com

Page 4: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

1 Executive Summary

The purpose of this paper is to demonstrate Red Hat Enterprise Linux 5.4's “out of the box” distinct and measurable performance advantage over Windows Server 2008 Enterprise when used as a platform to run OLTP workloads under RDBMS software such as Oracle database version 11g. The workload used employs Java/JDBC enabled N-tier application architecture with database embedded integrity constraints and indexing. The workload resembles real life applications rather than an artificial stripped down performance benchmark workload such as the constraint-less schemas typically used for TPC-C benchmark results.

Three scenarios were used to compare Oracle 11g performance on Red Hat Enterprise Linux 5.4 versus Windows Server 2008 Enterprise.

• Memory Resident• I/O Constrained• I/O Improved

In each test scenario, an external load driver was used to apply the load to the system under test. As shown in the graphs below, the load was gradually increased by adding simulated OLTP users. This was done until the systems under test could not handle any more users, i.e., adding any more users resulted in a decrease in throughput.

www.redhat.com 4

Figure 1:

Page 5: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

The first scenario utilizes a relatively small “workgroup sized” database that can easily be cached entirely in a moderately sized server's volatile memory (while still using all the transaction logging and consistency insurances that an enterprise level RDBMS such as Oracle 11g ensures). This simulation represents a highly active multi-user application that employs a relatively small embedded database in an N-tier Java client/server architecture. For instance, this scenario could simulate a large organization's internal help desk or some such other application that supports many transactions against a relatively small set of data. The memory resident tests described herein closely resemble this first use case . Red Hat Enterprise Linux 5.4 demonstrated approximately 20% better average performance than Microsoft Server 2008 R2 Enterprise as shown in Figure 1.

The second test scenario utilizes a much larger data store that can not be easily cached in volatile memory and therefore must exercise the I/O sub system as a critical component to performance. Here, not only are logging, transaction integrity and database caching stressed but data retrieval capabilities are also required. This test scenario simulates a much larger enterprise wide OLTP database such as those used for online retail businesses employing order entry clerks or large online customer self service applications. This test case intentionally introduces I/O latency comparable to that found in a heavily used but not necessarily I/O optimized application. This represents a low cost entry level SAN storage

5 www.redhat.com

Figure 2:

Page 6: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

solution running a moderately sized but highly utilized application.

For both Red Hat Enterprise Linux and Windows Server 2008 Enterprise, the on board one gigabit NICs where employed to directly connect the I/O subsystem. A six disk RAID5 virtual disk was created and all Oracle files including redo log, undo log, system, index and data were placed on this device. NTFS was used as the file system under Windows Server 2008 Enterprise and ext2fs was used in the Red Hat Enterprise Linux setup. Both cases used the default SAN settings and parameters. Identical Oracle configuration parameters were employed. Database sizing based on 100 million Customer table rows and 100 million Order table rows created a total Oracle database size of approximately 150 GB. Testing was performed using Oracle's automatic memory management features. Oracle database on Red Hat Enterprise Linux performed consistently higher, by an average margin of approximately 14%, compared to identically configured Windows Server 2008 Enterprise as shown in Figure 2.

The third scenario focuses on fibre channel storage. The database size was the same as the iSCSI/RAID5 scenario but 24 physical devices and multiple fibre channel interfaces optimized the I/O paths to a much higher degree than in the RAID5 iSCSI test bed. While disk latency

www.redhat.com 6

Figure 3:

Page 7: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

was intentionally allowed to manifest itself in the iSCSI test case – considerable effort was made to optimize the I/O sub system in the fibre channel test scenario. The intention was to emulate a high performance mission critical OLTP environment where cost considerations would be secondary to performance. Figure 3 shows the fibre disk storage comparison.

A minimum of RDBMS tuning was employed for all performance comparisons -- as the relative efficiency of each operating system platform is showcased by identical hardware resources and identical database and storage configurations.

In all of these test case scenarios, Red Hat Enterprise Linux demonstrates clear performance advantage over the Windows platform. This ranges from well over 20% performance gain with the small scale memory resident databases to 14% on the disk intensive I/O constrained larger database tests. Every effort was made to keep baseline configuration parameters, hardware resources and configurations consistent across both platforms. An overall 'out of the box' performance gain is observed by merely substituting the Red Hat Enterprise Linux platform for a Microsoft Windows Server 2008 platform.

7 www.redhat.com

Page 8: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

2 Overview: An Oracle OLTP Simulation and Test Tool.

2.1 Testing Software: Swingbench 2.2

Swingbench is an Oracle Corporation internally developed Java based benchmark application. This public domain JDBC based kit generates a schema, populates the database, drives the test transactions, and records and reports the results. It is designed to simulate an order entry application with a schema based loosely on other OLTP benchmarks such as TPC-C. The scaling of the benchmark is somewhat limited by contention on higher user counts by the limits of the Java clients. As user counts increase, this limits the upper end of the tests and thus all scenarios show a steady rise in transactions per minute until a critical 'knee' is encountered. At that point additional hardware resources do little to alleviate the bottleneck and no further meaningful throughput or transactions rate increases can be achieved. In the memory resident test scenarios this occurred at the point of approximately 250 simulated users – at that time JDBC connectivity errors would occur and throughput dropped dramatically. In the iSCSI I/O constrained scenarios the systems under test saturated with I/O contention and waits at much lower simulated user counts. Both operating systems profiled very closely in terms of supported user counts but Linux was able to consistently achieve greater throughput with the same number of users.

The author of the Swingbench Tool, Dominic Giles, maintains a website dedicated to Swingbench at http://dominicgiles.com/swingbench.html. Documentation, installation instructions, screen shots and software downloads are available at this site. While not as complicated an application schema as a typical actual business application, the Swingbench tool does rely on RDBMS referential integrity and measures performance based on a variety of different typical business transactions. Several variations of the test are available. This paper is focused on the Order Entry test.

Swingbench provides its own data loading utility for the Order Entry test scenario. A Java executable named “oewizard” will connect to an Oracle 'skeleton database', create the user “SOE” and then create a schema consisting of a number of tables, indexes constraints and stored logic. It also provides a data generation and loading functionality that allows the user to scale the size of the database to their environment. In the initial test case of a memory resident database application, the Order Entry wizard was instructed to create a Swingbench database and schema that included 887,156 rows in its Customer table and 300,607 rows in its order table. These specifications, along with the ancillary tables (described in Appendix B) created a database of approximately 750 MB. In the iSCSI I/O constrained test and the fibre channel I/O improved test scenarios, 100 million rows in both the Customer and Order tables were generated and loaded. This created a database that required roughly 150 GB of storage. All Oracle datafiles and logs were located on the RAID devices. The Oracle binaries- “$ORACLE_HOME”- resided on the OS disk. No other I/O activity occurred on the RAID

www.redhat.com 8

Page 9: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

devices while the tests were being run.

A separate client system executed the Swingbench client applications.

2.2 Hardware Configuration

Two different hardware configurations were used for the three test cases. Each test case was performed on both operating system platforms.

For the memory resident 750 MB database testing, a 48 GB RAM, HP ProLiant DL370 G6 server was configured with six 139 GB internal hard drives. This server has two sockets equipped with Intel W5580 processors; each processor has four cores with Hyperthreading Technology yielding sixteen processing threads. In both cases the operating system, swap files and Oracle RDBMS binaries were on one disk and a four disk RAID 0 stripe set was configured to host the database.

For the second test case scenario other servers also with 48 GB RAM and dual Intel X5570 processors were configured with an EMC Clarion AX150 storage device directly connected via a single one gigabit on board NIC using the iSCSI protocol. Six 250 GB SATA II drives where presented to each operating system. EMC Power Path version 5.3 along with the native iscsi-initiator-utils-6.2.0.871-0.10.el5.x86_64 RPM were used to configure the storage for the Red Hat Enterprise Linux configuration. EMC PowerPath 4.5 and the native Microsoft iSCSI initiator service were used in the Windows configuration. The AX150 unit has a 512 MB battery backed cache which was enabled. The third test case configuration was based on fibre channel storage. This I/O optimized scenario used the same servers as the RAID 5 test case but Qlogic QLE2464 Host Bus Adapters were installed and configured. These HBA's are dual port 4/8 GB fibre channel PCI cards. The adapters two ports were configured through a switched fabric network to twenty-four spindles that were configured into two RAID 0 volumes. The storage unit used was an HP MSA2324fc. All twenty-four disks were 250 GB capacity. One RAID 0 volume consisted of eight disks and served the redo log I/O. The other RAIDO device was composed of sixteen spindles and hosted the remainder of the database. Baseline I/O measurements using a tool called Iometer were performed on the Windows Server 2008 Enterprise platform. They indicated that the fibre channel/RAID0 configuration could provide about 4500 mixed I/O's per second versus approximately 3000 mixed I/O's per second with iSCSI/RAID.

A stand alone Linux client machine running Swingbench clients was used in all test case scenarios. It was never under significant load even at the highest generated users counts and did not influence overall throughput. At no time did network bandwidth ever rise above 2% utilization so network issues were also never a factor.

9 www.redhat.com

Page 10: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

2.3 Software Configuration

2.3.1 RDBMS Software

In all test configurations Oracle 11.1.0.6 was used. Identical database creation parameters (e.g. system tablespace size,redo log size , etc) were all identical. Appendix A lists the database creation scripts used to create the core database.

Red Hat Enterprise Linux 5.4 Windows 2008 Server Enterprise R2

Oracle Enterprise RDBMS 11.1.0.6 (x86_64)

Oracle Enterprise RDBMS 11.1.0.6 (x86_64)

Swingbench V 2.3 Swingbench V2.3

Table 1: Software

2.3.2 Oracle init.ora Parameters

Oracle “out of the box” auto memory management was used with max_sga_target set to 45 GB. Complete init.ora parameter listings are listed in Appendix A.

www.redhat.com 10

Page 11: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

3 Test Methodology

3.1 Swingbench

Database Size Customers Orders

Memory Resident 750 MB 887156 300607

iSCSI SANRAID5

I/O Constrained150 GB 100000000 100000000

Fibre Channel RAID0

I/O Improved150 GB 100000000 100000000

Table 2:

Table 3: Order Entry Database Table Sizes

3.1.1 Memory ResidentFive 250 GB internal SCSI drives were configured with a single device running the operating system system while a four drive RAID 0 stripe set (software based) supported the data files and logs. The workload was entirely memory resident – small enough to fit entirely in the Oracle SGA – where only redo and logging I/O occurred during steady state. The respective system monitoring tools Task Manager and Resource Manager for Windows Server 2008 R2 and iostat for Red Hat Enterprise Linux confirmed this. A single one gigabit network connection was used for the Swingbench client driver. Network bandwidth never approached significant levels of utilization through out the tests.

3.1.2 I/O Constrained iSCSI RAID 5

The iSCSI configuration was a single one gigabit NIC directly cabled to an EMC Clarion AX150s SAN enclosure. A six drive RAID5 device was configured and presented to the respective Windows and Red Hat Enterprise Linux 5.4 hosts. All Oracle files including redo, control files, system, sysaux, undo, temp, soedata and soeindex were placed on this device.

3.1.3 Improved I/O Fibre Channel RAID 0 The fibre channel configuration consisted of one Qlogic QLE2462 dual port HBA per test system connected to an HP MSA2324fc array through a switched fabric network. Two logical disk volumes were created. One consisted of an eight drive RAID 0 stripe set. The other was

11 www.redhat.com

Page 12: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

a 16 device RAID 0 stripe set. The Swingbench database redo logs were isolated from all other I/O by being placed on the eight drive RAID 0 stripe set. The rest of the database including system, sysaux, undo, temp soedata and soe index were placed on the 16 drive RAID 0 stripe. Note that this is NOT a recommended configuration for production. RAID 0 provides NO fault tolerance. The purpose of this configuration was to create an improved I/O but not memory resident scenario to fit between in memory and I/O constrained scenarios.

3.2 Database Creation / Swingbench Set Up

The Swingbench database is created and populated using oewizard. Oewizard is a Java executable supplied with the Swingbench toolkit. A GUI interface is provided that allows database sizing up to approximately ~150 Gigabytes. Here the user name and tablespace setup screen is shown. Note that the utility allows the user to enter user names other than “soe”:

This utility creates a user called SOE. Oewizard creates data and index tablespaces for SOE's data. Next, it creates and populates the schema. Oewizard then installs referential integrity constraints such as Primary Keys and Unique Constraints. Stored logic is also compiled and executed under the SOE schema. The following screen sets the size of the database and the upper scope of the benchmark is set by specifying the number of Order and Customer rows. In the memory resident test a database of 750 MB based on 1119437 rows in the customer table and 188799 rows in the order table was created. These numbers increased to 100 million rows each in the I/O intensive studies. As shown below 100 million customers and 100 million orders produces a 152 GB database. Fortunately, the 19½ hour

www.redhat.com 12

Page 13: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

build estimated build time was very conservative . Actual build times were closer to eight hours in all cases.

Swingbench is native to the Oracle RDBMS and uses features and functionality specific to Oracle. This makes direct comparisons to other RDBM's irrelevant but it is ideal for OS to OS comparisons. This is because this proprietary software is designed to do the same transactional work with the same code base – but on different operating systems.

Next the executable, swingbench.exe is invoked. This provides the GUI based interface to set the parameters for the tests shown below:

Each test was configured to run for fifteen minutes. A one minute ramp up period is followed by a fourteen minute measurement period. During this time Task Manager under Windows Server 2008 R2 Enterprise or top under Red Hat Enterprise Linux 5.4 was employed to monitor overall system activity. CPU utilization and disk I/O ranges were monitored as incremental load was applied. Overall, performance results dropped drastically when when CPU utilization rose above 95% or multiple Java client connection errors occurred – this indicated the so called performance “knee”.

Below is another view that Swingbench provides. This one displays a graphical overview of

13 www.redhat.com

Page 14: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

the entire run.

www.redhat.com 14

Page 15: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

3.3 Tuning & Optimizations

Overall, very little hardware and OS tuning was performed. This was intentional – these results are very close to “out of the box” comparisons and measurements.

Red Hat Enterprise Linux 5.4 : Kernel parameters set as listed in Appendix 3C

Additional RPMS installed:

unixODBC-2.2.11 libaio-devel-0.3.106

gcc-c++-4.1.2glibc-devel-2.5gcc-4.1.2

Kernel Parameter Changes: kernel.sem = 250 32000 100 128

fs.file-max = 6815744 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 1048576

Microsoft Windows Server 2008 Enterprise Enterprise R2

Service Pack 2

Two different test host platforms were used. The memory resident runs for both Windows and Red Hat Enterprise Linux 5.4 occurred on the same – an HP ProLiant DL370 server. I/O was entirely confined to this server's internal drive bay. In both Windows and Red Hat Enterprise Linux tests a four drive software based RAID 0 volume was created. The design of the test was such that only Oracle logging and transactional data would be written to disk in between checkpoints.

15 www.redhat.com

Page 16: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

3.4 RDBMS Tuning

These tests relied almost entirely on Oracle managed settings. During DBCA setup the database installer was instructed to create a custom database named “swingdb”. All Swingdb databases had the following storage characteristics:

Oracle Infrastructure Storage Required

SYSTEM 1024 MB

SYSAUX 1024 MB

UNDO 4096 MB

TEMP 4096 MB

USER 1024 MB

REDO LOGS 3 X 512 MB

Table 4: Oracle Storage Characteristics

Autoextend was set to enabled for all system and non-system tablespaces.

www.redhat.com 16

Page 17: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

All tests were performed with an Oracle memory footprint of approximately 45 GB on a 48 GB RAM server, 94% of server memory. During runs the client connections typically accounted for another one GB of memory usage. At the highest user counts and levels of utilization each OS had a minimum of two GB of memory free. No swapping was observed during any runs on either platform.

Appendix A provides the complete listing of the init.ora's filesused in auto memory management configurations. However the primary parameter is SGA_TARGET which was set to 45 GB.

17 www.redhat.com

Page 18: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

4 Results

Listed below are the tabular compilations and graphs of the results recorded. In every test case Red Hat Enterprise Linux 5.4 had better overall performance:

4.1 Memory ResidentThe memory resident tests generated the greatest performance delta between the two operating systems. The user counts were also significantly higher than in the disk based test cases.

Number of UsersWindows Server Enterprise R2

Red Hat Enterprise Linux 5.4

Percent Delta

150 71049 88370 24.38

200 84029 109771 30.63

210 84590 117080 38.41

220 83755 118096 41

230 82679 120893 46.22

240 81903 123827 51.19

Average 38.64

Table 5: Memory Resident Results

www.redhat.com 18

Page 19: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

19 www.redhat.com

Figure 4:

150 200 210 220 230 24 0

0

20000

4 0000

60000

80000

100000

120000

14 0000

Swingbench OLTP SImulation Average Throughput

Memory Resident

Windows Server Enterprise R2

Red Hat Enterprise Linux 5.4

Number of Users

Tra

ns

ac

tio

ns

Pe

r M

inu

te

Page 20: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

4.2 I/O Constrained RAID 5 iSCSI

In the I/O constrained scenario I/O contention flattens out the performance curve fairly quickly. As both systems approach disk saturation the apparent performance delta between the two also appears to diminish. This is because I/O limitations become the gating factor at approximately 12K TPM. Note that Red Hat Enterprise Linux approaches this I/O limitation sooner than Windows Server 2008 R2 as it is generating more transactions with less users

Number of UsersWindows Server

2008 Enterprise R2 Red Hat Enterprise

Linux 5.4 Percent Delta

25 7044 9454 34.21

30 8579 10384 21.04

35 9809 11126 13.43

40 9741 11184 14.81

45 10123 11673 15.31

50 10734 11803 9.96

55 11764 12140 3.2

Average 15.99

Table 6: I/O Contstrained Results

www.redhat.com 20

Page 21: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

21 www.redhat.com

Figure 5:

25 30 35 4 0 4 5 50 55

0

2000

4 000

6000

8000

10000

12000

14 000

Swingbench OLTP Average Throughput

I/O Constrained (iSCSI)

Windows Server 2008 Enterprise R2

Red Hat Enterprise Linux 5.4

Number of Users

Tra

na

sact

ion

s P

er M

inu

te

Page 22: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

4.3 I/O Improved RAID 0 Fibre Channel

The I/O improved test case shows Red Hat Enterprise Linux consistently performing more transactions under the Swingbench workload than Windows Server 2008 Enterprise R2. In the lower user count test cases the performance delta is significantly greater than higher user count tests.

Number of UsersWindows Server

2008 Enterprise R2 Red Hat Enterprise

Linux 5.4 Percent Delta

25 8167 10284 25.92

30 9303 11727 26.06

35 10296 12352 19.97

40 11123 12654 13.76

45 11276 12691 12.55

50 11446 12787 12.47

55 11088 12864 16.02

60 11615 12653 8.94

Average 16.96

Table 7: I/O Improved Results

www.redhat.com 22

Page 23: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

23 www.redhat.com

Figure 6:

25 30 35 4 0 4 5 50 55 60

0

2000

4 000

6000

8000

10000

12000

14 000

Swingbench OLTP Simulation Average Throughput

I/O Improved (Fibre Channel)

Windows Server 2008 Enterprise R2

Red Hat Enterprise Linux 5.4

Number of Users

Tra

ns

ac

tio

ns

Pe

r M

inu

te

Page 24: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

5 ConclusionsThese tests show a consistent, measurable and significant positive performance delta of Red Hat Enterprise Linux 5.4 over Microsoft's Windows Server 2008 R2 Enterprise. The cross platform productivity benchmark Swingbench generated a repeatable/measurable OLTP simulation on both platforms and in all cases; memory resident, I/O constrained, ND I/O improved -- Red Hat Enterprise Linux 5.4 outperformed Microsoft Server 2008 R2 Enterprise on identical hardware configurations. This performance gain, attained simply by choosing Red Hat Enterprise Linux over Windows Server 2008 Enterprise ranged from 16% and 38%. Also -note Oracle automatic memory management demonstrated good out of the box performance across both platforms.

www.redhat.com 24

Page 25: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Appendix A: Oracle DB Creation Scripts and Init.ora Listing

CreateDB.sql

connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /oracle/app/oracle/admin/swingdb/scripts/CreateDB.log startup nomount pfile="/oracle/app/oracle/admin/swingdb/scripts/init.ora"; CREATE DATABASE "swingdb" MAXINSTANCES 8 MAXLOGHISTORY 1 MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 DATAFILE '/oracle_1/oradata/swingdb/system01.dbf' SIZE 1024M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '/oracle_1/oradata/swingdb/sysaux01.dbf' SIZE 1024M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/oracle_1/oradata/swingdb/temp01.dbf' SIZE 2048M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/oracle_1/oradata/swingdb/undotbs01.dbf' SIZE 2048M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED CHARACTER SET WE8MSWIN1252 NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('/oracle_1/oradata/swingdb/redo01.log') SIZE 512M, GROUP 2 ('/oracle_1/oradata/swingdb/redo02.log') SIZE 512M, GROUP 3 ('/oracle_1/oradata/swingdb/redo03.log') SIZE 512M Alter USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";

spool off

CreateDBFiles.sqlconnect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /oracle/app/oracle/admin/swingdb/scripts/CreateDBFiles.log CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/oracle_1/oradata/swingdb/users01.dbf' SIZE 1024M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE

25 www.redhat.com

Page 26: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

MANAGEMENT AUTO; ALTER DATABASE DEFAULT TABLESPACE "USERS"; spool off

CreateDbCatalog.sqlconnect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /oracle/app/oracle/admin/swingdb/scripts/CreateDBCatalog.log @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/catalog.sql; @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/catblock.sql; @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/catproc.sql; @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/catoctk.sql; @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/owminst.plb; connect "SYSTEM"/"&&systemPassword" @/oracle/app/oracle/product/11.1.0/db_1/sqlplus/admin/pupbld.sql; connect "SYSTEM"/"&&systemPassword" set echo on spool /oracle/app/oracle/admin/swingdb/scripts/sqlPlusHelp.log @/oracle/app/oracle/product/11.1.0/db_1/sqlplus/admin/help/hlpbld.sql helpus.sql; spool off spool off

postDBCreation.sqlconnect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /oracle/app/oracle/admin/swingdb/scripts/postDBCreation.log connect "SYS"/"&&sysPassword" as SYSDBA set echo on create spfile='/oracle/app/oracle/product/11.1.0/db_1/dbs/spfileswingdb.ora' FROM pfile='/oracle/app/oracle/admin/swingdb/scripts/init.ora'; shutdown immediate; connect "SYS"/"&&sysPassword" as SYSDBA startup ; @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/undoaud.sql; @/oracle/app/oracle/product/11.1.0/db_1/rdbms/admin/undopwd.sql; execute DBMS_AUTO_TASK_ADMIN.disable(); select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual; execute ult_recomp.recomp_serial(); select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual; spool /oracle/app/oracle/admin/swingdb/scripts/postDBCreation.log

www.redhat.com 26

Page 27: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Appendix B: Order Entry Schema

Tables in the Order Entry Schema:

SQL> Select table_name from DBA_TABLES where owner = 'SOE';

TABLE_NAME ------------------------------ WAREHOUSES PRODUCT_INFORMATION PRODUCT_DESCRIPTIONS CUSTOMERS ORDER_ITEMS ORDERS INVENTORIES LOGON

SQL> desc soe.WAREHOUSES Name Null? Type ----------------------------------------- -------- ---------------------------- WAREHOUSE_ID NOT NULL NUMBER(6) WAREHOUSE_NAME VARCHAR2(35) LOCATION_ID NUMBER(4)

SQL> desc soe.PRODUCT_INFORMATION Name Null? Type ----------------------------------------- -------- ---------------------------- PRODUCT_ID NOT NULL NUMBER(6) PRODUCT_NAME VARCHAR2(50) PRODUCT_DESCRIPTION VARCHAR2(2000) CATEGORY_ID NUMBER(2) WEIGHT_CLASS NUMBER(1) WARRANTY_PERIOD INTERVAL YEAR(2) TO MONTH SUPPLIER_ID NUMBER(6) PRODUCT_STATUS VARCHAR2(20) LIST_PRICE NUMBER(8,2) MIN_PRICE NUMBER(8,2) CATALOG_URL VARCHAR2(50)

SQL> desc soe.PRODUCT_DESCRIPTIONS Name Null? Type ----------------------------------------- -------- ---------------------------- PRODUCT_ID NOT NULL NUMBER(6) LANGUAGE_ID NOT NULL VARCHAR2(3)

27 www.redhat.com

Page 28: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

TRANSLATED_NAME NOT NULL NVARCHAR2(50) TRANSLATED_DESCRIPTION NOT NULL NVARCHAR2(2000)

SQL> desc soe.CUSTOMERS Name Null? Type ----------------------------------------- -------- ---------------------------- CUSTOMER_ID NOT NULL NUMBER(12) CUST_FIRST_NAME NOT NULL VARCHAR2(30) CUST_LAST_NAME NOT NULL VARCHAR2(30) NLS_LANGUAGE VARCHAR2(3) NLS_TERRITORY VARCHAR2(30) CREDIT_LIMIT NUMBER(9,2) CUST_EMAIL VARCHAR2(100) ACCOUNT_MGR_ID NUMBER(6)

SQL> desc soe.ORDER_ITEMS Name Null? Type ----------------------------------------- -------- ---------------------------- ORDER_ID NOT NULL NUMBER(12) LINE_ITEM_ID NOT NULL NUMBER(3) PRODUCT_ID NOT NULL NUMBER(6) UNIT_PRICE NUMBER(8,2) QUANTITY NUMBER(8)

SQL> desc soe.ORDERS Name Null? Type ----------------------------------------- -------- ---------------------------- ORDER_ID NOT NULL NUMBER(12) ORDER_DATE NOT NULL TIMESTAMP(6) WITH LOCAL TIME

ZONE ORDER_MODE VARCHAR2(8) CUSTOMER_ID NOT NULL NUMBER(12) ORDER_STATUS NUMBER(2) ORDER_TOTAL NUMBER(8,2) SALES_REP_ID NUMBER(6) PROMOTION_ID NUMBER(6)

SQL> desc soe.INVENTORIES Name Null? Type ----------------------------------------- -------- ---------------------------- PRODUCT_ID NOT NULL NUMBER(6) WAREHOUSE_ID NOT NULL NUMBER(6) QUANTITY_ON_HAND NOT NULL NUMBER(8)

SQL> desc soe.LOGON Name Null? Type ----------------------------------------- -------- ---------------------------- CUSTOMER_ID NUMBER

www.redhat.com 28

Page 29: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

LOGON_DATE DATE

Order Entry Constraints (DDL listing soeconstraints.sql )

CREATE UNIQUE INDEX customers_pk ON customers (customer_id) tablespace &indextablespace nologging;

ALTER TABLE customers ADD ( CONSTRAINT customers_pk PRIMARY KEY (customer_id) );

ALTER TABLE CUSTOMERS ADD ( CONSTRAINT customer_credit_limit_max CHECK (credit_limit <= 5000) DEFERRABLE NOVALIDATE );

ALTER TABLE CUSTOMERS ADD ( CONSTRAINT customer_id_min CHECK (customer_id > 0) DEFERRABLE NOVALIDATE );

CREATE UNIQUE INDEX warehouses_pk ON warehouses (warehouse_id) tablespace &indextablespace nologging;

ALTER TABLE warehouses ADD (CONSTRAINT warehouses_pk PRIMARY KEY (warehouse_id));

CREATE UNIQUE INDEX order_items_pk ON order_items (order_id, line_item_id) tablespace &indextablespace nologging;

CREATE UNIQUE INDEX order_items_uk ON order_items (order_id, product_id) tablespace &indextablespace nologging;

ALTER TABLE order_items ADD ( CONSTRAINT order_items_pk PRIMARY KEY (order_id, line_item_id));

CREATE UNIQUE INDEX order_pk ON orders (order_id) tablespace &indextablespace nologging;

ALTER TABLE orders ADD ( CONSTRAINT order_pk PRIMARY KEY (order_id));

ALTER TABLE product_information ADD ( CONSTRAINT product_information_pk PRIMARY KEY (product_id));

CREATE UNIQUE INDEX prd_desc_pk ON product_descriptions(product_id,language_id) tablespace &indextablespace nologging;

29 www.redhat.com

Page 30: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

ALTER TABLE ORDERS ADD (constraint order_mode_lov CHECK(order_mode in ('direct','online')) DEFERRABLE NOVALIDATE );

ALTER TABLE ORDERS ADD (constraint order_total_min CHECK(order_total >= 0) DEFERRABLE NOVALIDATE );

ALTER TABLE product_descriptions ADD ( CONSTRAINT product_descriptions_pk PRIMARY KEY (product_id, language_id));

ALTER TABLE orders ADD ( CONSTRAINT orders_customer_id_fk FOREIGN KEY (customer_id) REFERENCES customers(customer_id) ON DELETE SET NULL ) ;

ALTER TABLE inventories ADD (CONSTRAINT inventory_pk PRIMARY KEY (product_id, warehouse_id));

ALTER TABLE inventories ADD ( CONSTRAINT inventories_warehouses_fk FOREIGN KEY (warehouse_id) REFERENCES warehouses (warehouse_id) ENABLE NOVALIDATE ) ;

ALTER TABLE inventories ADD ( CONSTRAINT inventories_product_id_fk FOREIGN KEY (product_id) REFERENCES product_information (product_id));

ALTER TABLE order_items ADD ( CONSTRAINT order_items_order_id_fk FOREIGN KEY (order_id) REFERENCES orders(order_id) ON DELETE CASCADE enable novalidate );

ALTER TABLE order_items ADD ( CONSTRAINT order_items_product_id_fk FOREIGN KEY (product_id) REFERENCES product_information(product_id));

ALTER TABLE product_descriptions REATE UNIQUE INDEX customers_pk ON customers (customer_id) tablespace &indextablespace nologging;

ALTER TABLE customers ADD ( CONSTRAINT customers_pk PRIMARY KEY (customer_id) ); ALTER TABLE CUSTOMERS ADD ( CONSTRAINT customer_credit_limit_max CHECK (credit_limit <= 5000) DEFERRABLE NOVALIDATE );

ALTER TABLE CUSTOMERS

www.redhat.com 30

Page 31: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

ADD ( CONSTRAINT customer_id_min CHECK (customer_id > 0) DEFERRABLE NOVALIDATE );

ALTER TABLE CUSTOMERS ADD ( CONSTRAINT customer_credit_limit_max CHECK (credit_limit <= 5000) DEFERRABLE NOVALIDATE );

CREATE UNIQUE INDEX warehouses_pk ON warehouses (warehouse_id) tablespace &indextablespace nologging;

ALTER TABLE warehouses ADD (CONSTRAINT warehouses_pk PRIMARY KEY (warehouse_id));

CREATE UNIQUE INDEX order_items_pk ON order_items (order_id, line_item_id) tablespace &indextablespace nologging;

CREATE UNIQUE INDEX order_items_uk ON order_items (order_id, product_id) tablespace &indextablespace nologging;

ALTER TABLE order_items ADD ( CONSTRAINT order_items_pk PRIMARY KEY (order_id, line_item_id));

CREATE UNIQUE INDEX order_pk ON orders (order_id) tablespace &indextablespace nologging;

ALTER TABLE orders ADD ( CONSTRAINT order_pk PRIMARY KEY (order_id));

ALTER TABLE product_information ADD ( CONSTRAINT product_information_pk PRIMARY KEY (product_id));

CREATE UNIQUE INDEX prd_desc_pk ON product_descriptions(product_id,language_id) tablespace &indextablespace nologging;

ALTER TABLE ORDERS ADD (constraint order_mode_lov CHECK(order_mode in ('direct','online')) DEFERRABLE NOVALIDATE );

Order Entry Indexes (DDL Listing soeindexes.sql)CREATE INDEX whs_location_ix ON warehouses (location_id) tablespace soeindex nologging;

CREATE INDEX inv_product_ix ON inventories (product_id) tablespace soeindex nologging;

31 www.redhat.com

Page 32: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

CREATE INDEX inv_warehouse_ix ON inventories (warehouse_id) tablespace soeindex nologging;

CREATE INDEX item_order_ix ON order_items (order_id) REVERSE tablespace soeindex nologging;

CREATE INDEX item_product_ix ON order_items (product_id) REVERSE tablespace soeindex nologging;

CREATE INDEX ord_sales_rep_ix ON orders (sales_rep_id) REVERSE tablespace soeindex nologging;

CREATE INDEX ord_customer_ix ON orders (customer_id) REVERSE tablespace soeindex nologging;

CREATE INDEX ord_order_date_ix ON orders (order_date) REVERSE tablespace soeindex nologging;

CREATE INDEX ord_status_ix ON orders (order_status) tablespace soeindex nologging;

CREATE INDEX cust_account_manager_ix ON customers (account_mgr_id) tablespace soeindex nologging;

CREATE INDEX cust_lname_ix ON customers (cust_last_name) tablespace soeindex nologging;

CREATE INDEX cust_email_ix ON customers (cust_email) tablespace soeindex nologging;

CREATE INDEX prod_name_ix ON product_descriptions (translated_name) tablespace soeindex nologging;

CREATE INDEX prod_supplier_ix ON product_information (supplier_id) tablespace soeindex nologging; CREATE INDEX cust_upper_name_ix ON customers (UPPER(cust_last_name), UPPER(cust_first_name)) tablespace soeindex nologging;

www.redhat.com 32

Page 33: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Order Entry Views (DDL Listing soeviews.sql)

CREATE OR REPLACE VIEW products AS SELECT i.product_id , d.language_id , CASE WHEN d.language_id IS NOT NULL THEN d.translated_name ELSE TRANSLATE(i.product_name USING NCHAR_CS) END AS product_name , i.category_id , CASE WHEN d.language_id IS NOT NULL THEN d.translated_description ELSE TRANSLATE(i.product_description USING NCHAR_CS) END AS product_description , i.weight_class , i.warranty_period , i.supplier_id , i.product_status , i.list_price , i.min_price , i.catalog_url FROM product_information i , product_descriptions d WHERE d.product_id (+) = i.product_id AND d.language_id (+) = sys_context('USERENV','LANG');

REM ======================================================= REM Create product_prices view of product_information REM columns to show view with a GROUP BY clause. REM =======================================================

CREATE OR REPLACE VIEW product_prices AS SELECT category_id , COUNT(*) as "#_OF_PRODUCTS" , MIN(list_price) as low_price , MAX(list_price) as high_price FROM product_information GROUP BY category_id; Order Entry Stored Procedures

Create or replace type integer_return_array is varray(25) of integer

33 www.redhat.com

Page 34: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

/

Order Entry Stored Logic (DDL Listing soepackage.sql)

create or replace PACKAGE swingbench AS function storedprocedure1(min_sleep integer, max_sleep integer) return integer_return_array; function storedprocedure2(min_sleep integer, max_sleep integer) return integer_return_array; function storedprocedure3(min_sleep integer, max_sleep integer) return integer_return_array; function storedprocedure4(min_sleep integer, max_sleep integer) return integer_return_array; function storedprocedure5(min_sleep integer, max_sleep integer) return integer_return_array; function storedprocedure6(min_sleep integer, max_sleep integer) return integer_return_array; END; /

create or replace PACKAGE BODY swingbench AS SELECT_STATEMENTS integer := 1; INSERT_STATEMENTS integer := 2; UPDATE_STATEMENTS integer := 3; DELETE_STATEMENTS integer := 4; COMMIT_STATEMENTS integer := 5; ROLLBACK_STATEMENTS integer := 6; dml_array integer_return_array := integer_return_array(); function from_mills_to_tens(value integer) return float is real_value float := 0; begin real_value := value/1000; return real_value; exception when zero_divide then real_value := 0; return real_value; end from_mills_to_tens; procedure sleep(min_sleep integer, max_sleep integer) is begin if (((max_sleep - min_sleep) > 0) AND (min_sleep < max_sleep)) then dbms_lock.sleep(dbms_random.value(from_mills_to_tens(max_sleep), from_mills_to_tens(min_sleep))); end sleep; procedure init_dml_array is begin dml_array := integer_return_array(); for i in 1..7 loop dml_array.extend; dml_array(i) := 0;

www.redhat.com 34

Page 35: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

end loop; end init_dml_array; procedure increment_selects(num_selects integer) is begin dml_array(SELECT_STATEMENTS) := dml_array(SELECT_STATEMENTS) + num_selects; end increment_selects; procedure increment_inserts(num_inserts integer) is begin dml_array(INSERT_STATEMENTS) := dml_array(INSERT_STATEMENTS) + num_inserts; end increment_inserts; procedure increment_updates(num_updates integer) is begin dml_array(UPDATE_STATEMENTS) := dml_array(UPDATE_STATEMENTS) + num_updates; end increment_updates; procedure increment_deletes(num_deletes integer) is begin dml_array(DELETE_STATEMENTS) := dml_array(DELETE_STATEMENTS) + num_deletes; end increment_deletes; procedure increment_commits(num_commits integer) is begin dml_array(COMMIT_STATEMENTS) := dml_array(COMMIT_STATEMENTS) + num_commits; end increment_commits; procedure increment_rollbacks(num_rollbacks integer) is begin dml_array(ROLLBACK_STATEMENTS) := dml_array(ROLLBACK_STATEMENTS) + num_rollbacks; end increment_rollbacks; function storedprocedure1(min_sleep integer, max_sleep integer) return integer_return_array is begin init_dml_array(); sleep(min_sleep, max_sleep); return dml_array; end storedprocedure1; function storedprocedure2(min_sleep integer, max_sleep integer) return integer_return_array is begin init_dml_array(); sleep(min_sleep, max_sleep); return dml_array; end storedprocedure3; function storedprocedure4(min_sleep integer, max_sleep integer) return integer_return_array is begin init_dml_array(); sleep(min_sleep, max_sleep);

35 www.redhat.com

Page 36: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

return dml_array; end storedprocedure4; function storedprocedure5(min_sleep integer, max_sleep integer) return integer_return_array is begin init_dml_array(); sleep(min_sleep, max_sleep); return dml_array; end storedprocedure5; function storedprocedure6(min_sleep integer, max_sleep integer) return integer_return_array is begin init_dml_array(); sleep(min_sleep, max_sleep); return dml_array; end storedprocedure6; END;

www.redhat.com 36

Page 37: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Appendix C: Red Hat Enterprise Linux 5.4 ISCSI Target Provider Configuration Steps

Install EMC PowerPath Version 5.4 for Linux.( Note: download this updated RPM this from the the EMC AX150 support site)

Install the iscsi-initiator-utils:

# yum install iscsi-initiator-utils Loaded plugins: rhnplugin, security Setting up Install Process

Start the target daemon:

# service tgtd start

Define a iscsi target name:

# /sbin/iscsi-inameiqn.1994-05.com.redhat:5eb7913c611

This will also create the file /etc/iscsi.conf:

DiscoveryAddress=192.168.11.2 HeaderDigest=never DataDigest=never PortalFailover=no Multipath=yes LUNs=0-255 DiskCommandTimout=10 Continuous=yes InitialR2T=yes ImmediateData=yes

Note the DiscoveryAddress is the IP of the of the disk subsystems' port.Make sure the iscsi service is running:

# service iscsi start

powermt display dev=all/etc/init.d/iscsi start iscsid (pid 8968) is running...

....

37 www.redhat.com

Page 38: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Setting up iSCSI targets: Logging in to [iface: default, target: iqn.1992-04.com.emc:ax.fcn-hw061900520.a1, portal: 192.168.11.2,3260] Logging in to [iface: default, target: iqn.1992-04.com.emc:ax.fcnhw061900520.a0, portal: 192.168.10.2,3260] Login to [iface: default, target: iqn.1992-04.com.emc:ax.fcnhw061900520.a1, portal: 192.168.11.2,3260]: successful

# /etc/init.d/PowerPath start cat /proc/scsi/scsi Starting PowerPath: done [root@zko scsi]# powermt config [root@zko scsi]# powermt display dev=all class=clariion Pseudo name=emcpowera CLARiiON ID=FCNHW061900520 [zko.lab.bos.redhat.com] Logical device ID=60060160942B1900C6413DF575C4DE11 [Virtual Disk 1] state=alive; policy=CLAROpt; priority=0; queued-IOs=0 Owner: default=SP A, current=SP A Array failover mode: 1 ============================================================================== ---------------- Host --------------- - Stor - -- I/O Path - -- Stats --- ### HW Path I/O Paths Interf. Mode State Q-IOs Errors ============================================================================== 4 iSCSI Initiator over TCP/I sdc SP A1 active alive 0 0

# fdisk -l

Device Boot Start End Blocks Id System /dev/sdc1 1 141769 1138750464 7 HPFS/NTFS

Disk /dev/emcpowera: 1166.0 GB, 1166083620864 bytes 255 heads, 63 sectors/track, 141768 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System /dev/emcpowera1 1 141769 1138750464 7 HPFS/NTFS

Use the following command to find the pseudo device name for the EMC disk device. -- Be sure to use the pseudo device name and not the other device names that point to this virtual drive.

# powermt display dev=all Pseudo name=emcpowera CLARiiON ID=FCNHW061900520 [zko.lab.bos.redhat.com] Logical device ID=60060160942B1900C6413DF575C4DE11 [Virtual Disk 1] state=alive; policy=CLAROpt; priority=0; queued-IOs=0 Owner: default=SP A, current=SP A Array failover mode: 1 ============================================================================== ---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---

www.redhat.com 38

Page 39: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

### HW Path I/O Paths Interf. Mode State Q-IOs Errors ============================================================================== 4 iSCSI Initiator over TCP/I sdc SP A1 active alive 0 0

Now use the fdisk utility to create a UNIX partition:

# fdisk /dev/emcpowera

The number of cylinders for this disk is set to 141768. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): t Selected partition 1 Hex code (type L to list codes): 83 Changed system type of partition 1 to 83 (Linux)

Command (m for help): p

Disk /dev/emcpowera: 1166.0 GB, 1166083620864 bytes 255 heads, 63 sectors/track, 141768 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System /dev/emcpowera1 1 141769 1138750464 83 Linux

Command (m for help): w The partition table has been altered!

Calling ioctl() to re-read partition table. Syncing disks.

View /proc/partitions to display the partition numbers created:

# cat /proc/partitions major minor #blocks name

8 0 488386584 sda 8 1 104391 sda1 8 2 488279610 sda2 253 0 436797440 dm-0 253 1 51478528 dm-1 8 16 1048576 sdb 8 32 1138753536 sdc

39 www.redhat.com

Page 40: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

8 33 1138750464 sdc1 120 0 1138753536 emcpowera 120 1 1138750464 emcpowera1

Now use mkfs to create a file system:

# mkfs /dev/emcpowera1 mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 142344192 inodes, 284687616 blocks 14234380 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 8688 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, cd /oracle102400000, 214990848

Writing inode tables: done Writing superblocks and filesystem accounting information:

# mount -t ext2 /dev/emcpowera1 /oracle_1

www.redhat.com 40

Page 41: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Appendix D: Configuration of Fibre Storage on Red Hat Enterprise Linux 5.4 with Multipathing

Steps to configure Fibre Channel Storage on Red Hat Enterprise Linux 5.4:

1. Install Qlogic dual port fibre Channel HBA.2. Cable both ports to switching device.3. Ensure switching device cabled to MAS storage enclosure.4. Access to switch's management web page and ensure connectivity.

5.Access MSA Web page

41 www.redhat.com

Page 42: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

MAS Management Console Overview:

Install or upgrade the device mapper multi-pathing software:

# yum install device-mapper-multipath Loaded plugins: rhnplugin, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package device-mapper-multipath.x86_64 0:0.4.7-30.el5_4.2 set to be updated --> Processing Dependency: kpartx = 0.4.7-30.el5_4.2 for package: device-mapper-multi-path --> Running transaction check ---> Package kpartx.x86_64 0:0.4.7-30.el5_4.2 set to be updated --> Finished Dependency Resolution

www.redhat.com 42

Page 43: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Dependencies Resolved

================================================================================ Package Arch Version Repository Size ================================================================================ Updating: device-mapper-multipath x86_64 0.4.7-30.el5_4.2 rhel-x86_64-server-5 3.0 M Updating for dependencies: kpartx x86_64 0.4.7-30.el5_4.2 rhel-x86_64-server-5 426 k

Transaction Summary ================================================================================ Install 0 Package(s) Update 2 Package(s) Remove 0 Package(s)

Total download size: 3.4 M Is this ok [y/N]: y Downloading Packages: (1/2): kpartx-0.4.7-30.el5_4.2.x86_64.rpm | 426 kB 00:00 (2/2): device-mapper-multipath-0.4.7-30.el5_4.2.x86_64.r | 3.0 MB 00:01 -------------------------------------------------------------------------------- Total 989 kB/s | 3.4 MB 00:03 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Updating : kpartx 1/4 Updating : device-mapper-multipath 2/4 Cleanup : kpartx 3/4 Cleanup : device-mapper-multipath 4/4

Updated: device-mapper-multipath.x86_64 0:0.4.7-30.el5_4.2

Dependency Updated: kpartx.x86_64 0:0.4.7-30.el5_4.2

Now edit the /etc/multipath.conf:

Comment out the blacklist section of /etc/multipath.conf file.

#blacklist { # devnode "*" #}

43 www.redhat.com

Page 44: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Use wwid's of your devices in the alias section of the multipaths clause. To get them enter the following command using the device name you use to mount it as the /block/xxx parameter:

# scsi_id -g -s /block/sdb 3600c0ff000d7e7a8cf3afd4a01000000

# scsi_id -g -s /block/sdc 3600c0ff000d7f359ed3afd4a01000000

Use these WWID's in the “multipaths” section of /etc/multipath.conf. Optionally you can alias these device to make clearer which devices are generating I/O:

multipaths { # multipath { # wwid 3600508b4000156d700012000000b0000 # alias yellow # path_grouping_policy multibus # path_checker readsector0 # path_selector "round-robin 0" # failback manual # rr_weight priorities # no_path_retry 5 # } multipath wwid 3600c0ff000d7e7a8cf3afd4a01000000 alias oracle_data } multipath wwid 3600c0ff000d7f359ed3afd4a01000000 alias oracle_log }

Add the device descriptor for your array:

device{ vendor "HP" product "MSA2312fc|MSA2324fc|MSA2312i|MSA2324i" getuid_callout "/sbin/scsi_id -g -u -s /block/%n" hardware_handler "0" path_selector "round-robin 0" prio_callout "/sbin/mpath_prio_alua /dev/%n" path_grouping_policy group_by_prio

www.redhat.com 44

Page 45: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

failback immediate rr_weight uniform no_path_retry 18rr_min_io 100path_checker tur}

To check on a multi-path configuration before you actually configure it – as root, use the following command:

# multipath -ll oracle_log (3600c0ff000d7f359ed3afd4a01000000) dm-3 HP,MSA2324fc [size=1.1T][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=100][active] \_ 4:0:11:0 sdc 8:32 [active][ready] \_ 5:0:10:0 sde 8:64 [active][ready] oracle_data (3600c0ff000d7e7a8cf3afd4a01000000) dm-2 HP,MSA2324fc [size=2.1T][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=100][active] \_ 4:0:6:0 sdb 8:16 [active][ready] \_ 5:0:7:0 sdd 8:48 [active][ready]

45 www.redhat.com

Page 46: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

Appendix E: Windows Performance Monitoring ToolsWindows Task and Resource Monitor steady state during a 25 user Swingbench run:

www.redhat.com 46

Page 47: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

IOMETER Under Windows Server 2008 Enterprise:

Pictured below is a screen shot of the public domain IO utility called Iometer. Here we are conducting a comprehensive through put test of the iSCSI configuration running under Windows Server 2008 Enterprise. The first shows the results tab of the GUI interface. Below it is the Windows resource monitor showing the Iometer executable generating a mixed read write I/O workload.

47 www.redhat.com

Page 48: Comparing Oracle OLTP Performance on Red Hat … Oracle OLTP Performance on Red Hat Enterprise Linux 5.4 to Windows Server 2008 R2 Enterprise OLTP Workload (Swingbench 2.2) OLTP Workload

The tables below summarize the results of “all in one' Iometer test runs on the Windows Server 2008 Enterprise server. First, iSCSI disk configuration and second, the fibre storage configuration are listed. This was a baseline test to determine the relative raw I/O capabilities of these configurations. As can be seen, the fibre storage configuration could deliver ~ 500 more mixed I/O's per second as well as nearly 7 MB per second aggregate through put. It contained 16 spindles rather than 6 spindles for the iSCSI configuration.

Windows Server 2008 Enterprise iSCSI Disk Performance Mixed I/O Baseline

Total I/O's per Second 3027

Total Megabytes per Second 38.79MB/sec

Total Number of read I/O's per Second 1511

Total Number of I/O Writes per Second 1513

Average Disk Response Time (MS) 6.61

Total Number Of Interrupts per Second 7227

Windows Server 2008 Enterprise Fibre Channel Disk Performance Mixed I/O BaselineTotal I/O's per Second 3555

Total Megabytes per Second 45.47 MB/Sec

Total Number of read I/O's per Second 1778

Total Number of I/O Writes per Second 1778

Average Disk Response Time (MS) 4.5

Total Number Of Interrupts per Second 4363

www.redhat.com 48