Tuning the Operating System

19

Copyright © Oracle Corporation, 2002. All rights reserved.

Objectives

Identify similarities between OS and DB tuning

After completing this lesson, you should be able to do the following: • Describe different system architectures • Describe the primary steps of OS tuning • • Understand virtual memory and paging • Explain the difference between a process and a

thread

19-2

Copyright © Oracle Corporation, 2002. All rights reserved.

Operating System Tuning

Memory

SGA

Non-Oracle processes Oracle processes

OS

19-3

Copyright © Oracle Corporation, 2002. All rights reserved.

OS and DB files

System Architectures

The Oracle database can run on different system architectures. Some examples are: • Uni Processor systems • Symmetric multiprocessing systems (SMP) • Massively parallel processing systems (MPP) • Clustered systems • Nonuniform memory architecture systems (NUMA)

19-4

Copyright © Oracle Corporation, 2002. All rights reserved.

19-5

Copyright © Oracle Corporation, 2002. All rights reserved.

Virtual and Physical Memory

MMU

19-6

Copyright © Oracle Corporation, 2002. All rights reserved.

Virtual memory Physical memory Page table possibly with ISM

Paging and Swapping

Memory

Process Page

19-7

Copyright © Oracle Corporation, 2002. All rights reserved.

Swap device

Tuning Memory

• Database tuning can improve paging performance

by locking SGA into real memory. The DBA should monitor real and virtual memory use. The DBA should use intimate shared memory, if it is available.

19-8

Copyright © Oracle Corporation, 2002. All rights reserved.

Tuning I/O

Memory

CPU

System bus

19-9

Copyright © Oracle Corporation, 2002. All rights reserved.

I/O controller I/O controller I/O controller

Understanding Different I/O System Calls

Operating systems can perform disk I/O in two different ways: • Normal (blocking) I/O • Asynchronous (nonblocking) I/O is implemented on

most platforms and file systems

19-10

Copyright © Oracle Corporation, 2002. All rights reserved.

CPU Tuning

• Guidelines:

– Maximum CPU busy rate: 90% – Maximum OS/User processing ratio: 40/60 – CPU load balanced across CPUs

• Monitoring: – CPU – Process

19-11

Copyright © Oracle Corporation, 2002. All rights reserved.

19-12

Copyright © Oracle Corporation, 2002. All rights reserved.

Process versus Thread

Oracle processes

p m o n s m o n d b w 0 l g w r c k p t a r c 0

S Q L P L U S

P r o c e s s e s

SQL*PLUS process Oracle.exe process

Thread Threads

T h r e a d s

19-13

Copyright © Oracle Corporation, 2002. All rights reserved.

Summary

Identify similarities between OS and DB tuning

In this lesson, you should have learned how to: • Describe different system architectures • Describe the primary steps of OS tuning • • Understand virtual memory and paging • Explain the difference between a process and

a thread

19-14

Copyright © Oracle Corporation, 2002. All rights reserved.