optimize oracle on vmware

24
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Optimize Oracle on VMware Tips for Optimal Virtualized Oracle Databases PHLOUG Philadelphia, PA June 16th

Upload: nita-coffey

Post on 31-Dec-2015

55 views

Category:

Documents


3 download

DESCRIPTION

Optimize Oracle on VMware. Tips for Optimal Virtualized Oracle Databases PHLOUG Philadelphia, PA June 16th. Bert Scalzo …. Database Expert & Product Architect for Quest Software Oracle Background: Worked with Oracle databases for over two decades (starting with version 4) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Optimize Oracle on VMware

© 2008 Quest Software, Inc. ALL RIGHTS RESERVED.

Optimize Oracle on VMware

Tips for Optimal Virtualized Oracle Databases

PHLOUGPhiladelphia, PAJune 16th

Page 2: Optimize Oracle on VMware

2

Bert Scalzo …Database Expert & Product Architect for Quest Software

Oracle Background:• Worked with Oracle databases for over two decades (starting with version 4)• Work history includes time at both “Oracle Education” and “Oracle Consulting”

Academic Background:• Several Oracle Masters certifications• BS, MS and PhD in Computer Science• MBA (general business)• Several insurance industry designations

Key Interests:• Data Modeling• Database Benchmarking• Database Tuning & Optimization• "Star Schema" Data Warehouses• Oracle on Linux – and specifically: RAC on Linux

Articles for:• Oracle’s Technology Network (OTN)• Oracle Magazine,• Oracle Informant• PC Week (eWeek)

Articles for:• Dell Power Solutions

Magazine• The Linux Journal• www.linux.com• www.orafaq.com

Page 3: Optimize Oracle on VMware

3

Books by Bert …

Coming in 2009 …

Page 4: Optimize Oracle on VMware

Couple of Questions…

• How many people are doing Oracle on

– VMware Server (freeware)– VMware Workstation 6.x– VMware ESXi (freeware)– VMware Infrastructure 3– Other Virtual Platforms

– Virtual Box– Hyper Visor– Zen Server– Oracle VM Server– Sun xVM

Page 5: Optimize Oracle on VMware

Agenda

• Discuss the Virtualization Trend

• Challenge: Shared Resources

• Used Quest Tools to Simplify & Maximize Results

– Foglight for VMware

– Foglight Database Performance Analysis

– Benchmark Factory for Databases

• 440% Database Improvement on Same Hardware!

• How is that possible – What Black Magic was used?

• Result = Easy Best Practices for Oracle on VMware

Page 6: Optimize Oracle on VMware

The Trend is Clear …

• Virtualization is proliferating for many good reasons

• Hardware new purchase costs continue to decrease• Hardware overall performance continues to increase

• Database Administrators have been hesitant to date

• But minimal virtualization overhead costs are quickly becoming much less of an issue, even for databases

• In the near future, databases too will be the norm …

Page 7: Optimize Oracle on VMware

Fundamental ChallengeUnderstanding the impact of resource sharing

CPUMulti-Core Processors

NetworkShared Connectivity

Load Balancing

Redundancy

MemorySharing

Over-commitment

DiskShared storage

Fiber, iSCSI, NAS

Core 4 Resources

Page 8: Optimize Oracle on VMware

Nothing New Here …

• DBA’s have always cared deeply about database server CPU, memory, disk and network utilization

• But often in the past databases were on dedicated hardware – so databases were more “solo islands”

• Now we must account for shared everything – and not just disk space as with SAN/NAS/iSCSi storage servers

• We might even have different database platforms sharing our resources (e.g. Microsoft SQL Server)

Page 9: Optimize Oracle on VMware

Some Tools I used …

• Not pitching or selling anything here – just disclosure

• There are lot’s of good tools out there - pick whatever

• In brief – here’s what I used and why (its purpose):

– Load Generator = Benchmark Factory for Databases– Virtualization Monitor = Foglight for VMware– Database Performance = Foglight Database

Performance Analysis

– Database Ad-Hoc Diagnostics = Spotlight for Oracle

Page 10: Optimize Oracle on VMware

Foglight for VMwareMonitor Shared Resources

Find & FixGenuine VMPerformance Issues

Help to SqueezeMaximum“Overall”Throughput

Page 11: Optimize Oracle on VMware

Foglight for Database AnalysisMonitor Database Resources

Find & FixGenuine DBPerformance Issues

Help to SqueezeMaximum“Database”Throughput

Page 12: Optimize Oracle on VMware

Benchmark Factory for DatabasesGenerate Database Workload

Stress theDatabase IntroducePerformance Issues

Help to ExposePotentialCandidates

Each step above is an individual test for my proposed best practices – and their results

Page 13: Optimize Oracle on VMware

440% Improvement for Proper Setup

1080 msAverage ResponseTime

200 msAverage ResponseTime

Page 14: Optimize Oracle on VMware

The Top Ten Tricks Applied …1. Obtain a baseline test for relative comparisons

2. On the VM host, exclude VM clients from active, online virus scans

3. Remove Windows Indexing Service (because really don’t need fast file system searches for an Oracle database)

4. Remove other extraneous Windows services (there are lots)

5. Change the VM host registry settings to improve file system IO for databases

6. Optimize the VM host configuration and options

7. Optimize the VM client OS configuration and options for Oracle database

8. Remove other extraneous VM client OS services and daemons

9. Change VM client file system settings to improve IO performance for databases

10. Adjust VM client file system block size to more closely match Oracle block size

Page 15: Optimize Oracle on VMware

Optimize All File Systems for Database …

From ten overall steps – focus on these two:• #5 = Change the VM host registry settings to improve

file system IO for databases• #9 = Change VM client file system settings to improve

IO performance for databases

For Windows, simply adjust the following registry entry:• HKEY_LOCAL_MACHINE\System\CurrentControlSet\

Control\FileSystem\NtfsDisableLastAccessUpdate = 1

Since we know that Oracle “touches” data files every three seconds or more – why track the “date/timestamp” of when each file was lasted touched – we don’t need it

Page 16: Optimize Oracle on VMware

Can do this from some PC tools …

Page 17: Optimize Oracle on VMware

Let’s not Forget My Favorite - Linux …

We can set the arrtibute for the individual Oracle files:

chattr +A file_name

Or we can do it for an entire directory:

chattr –R +A directory_name

However the best method (because it automatically

handles any file additions) is to edit the /etc/fstab and

add the NOATIME attribute:

/dev/sda6 / ext3 defaults,noatime 1 1

/dev/sda1 /boot ext2 defaults,noatime 1 2

/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0

/dev/sda5 swap swap defaults 0 0

Page 18: Optimize Oracle on VMware

Match File System & Database Block Size …

From ten overall steps – focus on this one: #10 = Adjust VM client file system block size to more closely

match Oracle block size

Assume we have a Linux host running a Linux based Oracle database client.

Let’s examine Scenario #2 from the chart next page.

Start by assuming that the host file system using the default block size: 2K.

Further assume that the client file system also using the default block size: 2K.

But that the Oracle DBA sets the DB block size to 4K – so we have a mismatch.

Thus each Oracle physical IO requests asks the client OS for two IO’s,

and each client IO asks the host for one IO. That’s a total of four logical

IO requests (although only two physical IO’s in reality – but note that

there’s overhead for each logical IO request, so larger numbers are worse)

Page 19: Optimize Oracle on VMware
Page 20: Optimize Oracle on VMware

Services, Services, Services …

From ten overall steps – focus on this one: #4 = Remove other extraneous Windows services (there

are lots) #8 = Remove other extraneous VM client OS services and

daemons

This step is very, very subjective – do so with great care Your situation & needs will dictate what can be turned off No two scenarios will be 100% alike – so mileage will vary

Therefore take my next two slides with a “grain of salt” ….

Page 21: Optimize Oracle on VMware
Page 22: Optimize Oracle on VMware
Page 23: Optimize Oracle on VMware

Lessons Learned (i.e. Best Practices)

• Tons of “low hanging fruit” (i.e. easy no-brainer stuff)

• Optimize each of the four major VM platform stacks

– Optimize the Host Machine (BIOS too)

– Optimize the Host VMware Setup

– Optimize the Guest VM Configuration

– Optimize the Guest Operating System

• Remember: 440% improvement for practically free

Page 24: Optimize Oracle on VMware

Presenter:Bert Scalzo: [email protected]

Questions and Answers …

Note: these slides should be available on OOUG web site, but we’ll also make sure to post them on our company’s web site:

www.toadworld.com/Experts/BertScalzosToadFanaticism/tabid/318/Default.aspx

Thank You