Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

VMware: Tuning Linux

Oracle Tips by Burleson Consulting
 

Tuning Linux for proper CPU setup is actually quite easy there are just two items to address. First, make sure to install the correct address space version to match your CPU architecture (i.e. 32-bit vs. 64-bit). I have not found this to make a substantial and directly measureable impact. It is simply that 64-bit environments offer larger address spaces and thus larger SGAs, which can often potentially reduce overall I/O. Second, make sure to always install the SMP kernel regardless of your hardware. A single CPU running an SMP kernel will suffer a very small but acceptable performance penalty. But remember, think more generically as you tune. Today's single may well be tomorrows double or even quad. To best reap those potential performance rewards, you should err on the side of potentially more CPUs in the future.

Optimizing Linux memory usage is much like the CPU - assume you have the minimum requirements to meet your business SLA needs, but keep in mind that it could grow at any time. However, unlike the CPU where you can simply choose the single option for SMP kernel to cover all bases, you potentially have two choices with regard to memory configuration.

If using 32-bit Linux, then the address space is limited by hardware to 4GB with a Linux imposed split of 3GB for user space and 1GB for kernel space. However, there are some well known workarounds as shown in the table on the following page (all of which are well documented on Oracles MOSC web site and in numerous Oracle book & papers). But the days of 32-bit are numbered, so it is better to accept the inevitable and adopt 64-bit as soon as possible.

Kernel

Type

Total

RAM

SGA Limit

Work

Around

Uniprocessor or SMP

<4GB

1.70GB

                None Default

Uniprocessor or SMP

<4GB

2.00GB

Low SGA Attach Address

Uniprocessor or SMP

<4GB

2.70GB

In-Memory File System

SMP normalmem

16GB

14.00GB

In-Memory File System

SMP hugemem

<4GB

2.70GB

None Default

SMP hugemem

<4GB

3.42GB

Low SGA Attach Address

SMP hugemem

>4GB

3.42GB

Low SGA Attach Address

SMP hugemem

64GB

62.00GB

In-Memory File System

Table 1: Examples of Workarounds

Of course, if you are using 64-bit Linux, this entire memory issue is essentially eliminated. However, there is one more little tweak that can be applied to either 32-bit or 64-bit Oracle servers and that is the use of Huge Pages. This Linux 2.6 kernel feature simply utilizes larger than the 4K pages to reduce virtual memory I/O operations when working with lots of memory. Here are some documented limits:

Hardware Platform

Kernel 2.4

Kernel 2.6

Linux x86 (IA32)

4MB

4MB

Linux x86-64 (AMD64, EM64T)

2MB

2MB

Linux Itanium (IA64)

256MB

256MB

IBM Power Based Linux (PPC64)

NA

16MB

IBM zSeries Based Linux

NA

NA

IBM S/390 Based Linux

NA

NA

The process to enable huge pages is as follows:

  • X = grep Hugepagesize /proc/meminfo

  • Y = Largest (MB of all client SGAs) * 1024

  • Z = # Huge Pages needed = Y / X

  • Set Huge Page Pool size

edit /etc/sysctl.con
vm.nr_hugepages = Z

  • Increase ulimit parameter memlock for oracle user

    • edit /etc/security/limits.conf

    • oracle soft   memlock          Y

    • oracle hard  memlock          Y

  • reboot

Important note:  Some experts DO NOT recommend using Automatic Memory Management (AMM, e.g. setting memory_target) with Linux hugepages.  See MOSC note 749851.1 "HugePages and Oracle Database 11g Automatic Memory Management (AMM) on Linux". 

In sum, AMM is not compatible with Linux Hugepages.  Also, beware that AMM re-size operations can cripple Oracle performance in some cases.

Interestingly enough, many people with killer 64-bit servers increase their SGA size without implementing Huge Pages. The results have been well documented (see Oracles MOSC document id = 361670.1) where SGA sizes greater than 10GB have displayed decreases in performance! So as a general practice, always implement Huge Pages.

To improve I/O for file system based Oracle data files, Linux offers a little known and seldom used option that can yield between 50-150% performance improvements in standard database benchmarks like the TPC-C by simply changing the /etc/fstab file entries for our Oracle data file mount points as follows:

  • For ext2 and 3 file systems, add ,noatime to the third column.

What this does is tell the operating system that it is not necessary to update the last access time for directories and files under that mount point, which translates into radically reduced total I/O. Since the Oracle background processes are already accessing the data files every three seconds and have their own headers with timestamps within them, why spend I/O resources to update time attributes for files or directories?

To improve I/O for ASM based oracle data files, simply double the default SGA sizing parameter for the ASM instance from 64MB to 128MB. Memory is far too cheap these days to haggle over such a small amount. And the obvious results will more than justify the cost.
 


This is an excerpt from
Oracle on VMWare: Expert tips for database virtualization by Rampant TechPress.


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.