28
<Insert Picture Here> Mixed Workload Management for Oracle Exadata 김지훈 Database Technology, Technology Sales Consulting, Oracle Korea

Mixed workload mgmt for exadata

  • Upload
    cana-ko

  • View
    1.145

  • Download
    5

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Mixed workload mgmt for exadata

<Insert Picture Here>

Mixed Workload Management for Oracle Exadata

김지훈Database Technology, Technology Sales Consulting, Oracle Korea

Page 2: Mixed workload mgmt for exadata

Oracle Exadata Database Machine다양한 업무 처리 가능 플랫폼

• Data Warehousing

• OLTP

• Database Consolidation

© 2011 Oracle Corporation 2

Page 3: Mixed workload mgmt for exadata

Exadata를 통한 통합 구현비용 절감, 긴밀한 업무 통합

• Extreme Performance

• Large Memory

• Workload Management

© 2011 Oracle Corporation 3

Page 4: Mixed workload mgmt for exadata

Exadata의 Workload Management데이터베이스 통합을 위한 선결과제

• Instance caging

• Database Resource Manager

• Parallel statement queuing

• I/O Resource Manager

© 2011 Oracle Corporation 4

Page 5: Mixed workload mgmt for exadata

Database Resource

Management (DBRM)

© 2011 Oracle Corporation 5

Page 6: Mixed workload mgmt for exadata

Resource Management 사용Enterprise Manager 활용

© 2011 Oracle Corporation 6

Page 7: Mixed workload mgmt for exadata

Resource Management1 단계: 컨슈머 그룹 생성 후 세션과 매핑

컨슈머그룹

OLTP

사용자세션 매핑 규칙

서비스, 모듈, 작업명(조합가능),

Oracle 유저명, 클라이언트프로그램명, OS 유저명,

클라이언트 머신명, 클라이언트 아이디

Reports

Ad-Hoc

Low Pri

© 2011 Oracle Corporation 7

Page 8: Mixed workload mgmt for exadata

Resource Management1 단계: 컨슈머 그룹 생성 후 세션과 매핑

service = ‘Customer_Service’

client program = ‘Siebel Call Center’

Oracle user = ‘Reports%’

module = ‘Oscar’

query has been running > 1 hour

estimated execution time of query > 1 hour

OLTP

Reports

Ad-Hoc

Low Pri

컨슈머그룹

사용자세션 매핑 규칙

© 2011 Oracle Corporation 8

Page 9: Mixed workload mgmt for exadata

Resource Management2 단계: 리소스 플랜 생성

컨슈머 그룹에리소스 할당

리소스플랜

컨슈머그룹

OLTP

사용자세션

컨슈머 그룹 플랜 레벨 1 플랜 레벨 2 할당 상한값

OLTP 90%

Reports 60% 80%

Ad-Hoc 10% 30% 50%

Low Pri 10% 50%

Reports

Ad-Hoc

Low Pri

© 2011 Oracle Corporation 9

Page 10: Mixed workload mgmt for exadata

Resource Management3 단계: 플랜 활성화

컨슈머 그룹에리소스 할당

리소스플랜

컨슈머그룹

사용자세션

ExadataStorage Server

Software

CPU (DBRM)

I/O (IORM)

Oracle Database Instance

OLTP

Reports

Ad-Hoc

Low Pri

© 2011 Oracle Corporation 10

Page 11: Mixed workload mgmt for exadata

Parallel Statement

Queuing

© 2011 Oracle Corporation 11

Page 12: Mixed workload mgmt for exadata

Parallel Statement Queuing

• 개념

1. 모든 시스템 자원을 사용할 수 있도록 충분한 parallel statement를실행

2. 다음 실행될 parallel statement를 queuing

3. 다른 업무에 영향을 미치지 않는 경우 parallel statement는 queuing

되지 않음

• 중요한 query에 대해 queuing 되지 않게 할 수 있는가?

• Resource Manager를 통해 policy 설정

• 중요한 query가 queuing되지 않는 것을 어떻게 보장할 수 있는가?

• Consumer Group에서 parallel server 수의 제한 설정

• Consumer Group에서 DOP 제한 설정

© 2011 Oracle Corporation 12

Page 13: Mixed workload mgmt for exadata

Parallel Execution 관리

• Parallel servers는 제한적 자원

• parallel_max_servers에 의해 설정 / 제한됨

• 과도한 동시 parallel statement는 thrashing을 야기함

• 더이상의 parallel server가 없을 경우

• 중요 statement도 serial하게 실행될 수 있음

• Parallel server가 확보되더라도 downgrade된 DOP는 복구되지 않음

• 해결책

• Parallel statement queuing

• parallel_degree_policy = “auto” 설정으로 활성화

© 2011 Oracle Corporation 13

Page 14: Mixed workload mgmt for exadata

I/O Resource Manager

(IORM)

© 2011 Oracle Corporation 14

Page 15: Mixed workload mgmt for exadata

Disk I/O 관리

• Exadata에서도 역시 Disk bandwidth는 매우 중요한 자원

• 하나의 query에 의한 매우 높은 비율의 disk bandwidth 사용

• 여러개의 parallel query로 인한 disk load와 긴 disk latency 발생

• 해결책 – Exadata I/O Resource Manager

• Database Resource Plan을 이용하여 Exadata I/O Resource Manager 설정

• CPU 및 I/O 관리에 대한 동일한 resource plan 사용

Inter-database resource plan의 생성으로 활성화:

Allocation Limit

Sales DB 50%

Finance DB 25% 50%

Marketing DB 25% 50%

© 2011 Oracle Corporation 15

Page 16: Mixed workload mgmt for exadata

I/O Resource Manager가 특별한 이유?

• Oracle Exadata에서만 사용 가능

• 어떠한 hardware 또는 software vendor도 Oracle I/O의 관리 불가!

• Exadata의 iDB protocol에 의해 모든 I/O는 tagging 됨 :

• Database id

• Consumer Group id

• Background id

• Why the I/O was issued

• IORM은 중요 I/O에 대해 선처리 – log writes, checkpoints, control file

• IORM은 중요도가 떨어지는 I/O에 대해 후처리 – DBWR aged buffer

writes

© 2011 Oracle Corporation 16

Page 17: Mixed workload mgmt for exadata

일반적인 스토리지 서버의 I/O스케줄링

HR

Database

O T O

ERP

Database

I/O 리퀘스트 큐

R

Traditional

Storage

Server

I/O 리퀘스트

© 2011 Oracle Corporation 17

Page 18: Mixed workload mgmt for exadata

Exadata I/O Resource Manager2 단계 리소스 플랜

EDW

Database

ERP

Database

HR

Database

OLTP Reports Ad Hoc

Ex/adata스토리지

Intra-Database Resource Plan

하나의 데이터베이스에

들어오는 워크로드간 리소스

할당 우선순위를 결정

Inter-Database Resource Plan

Exadata 스토리지 셀을

공유하는 다수의 데이터베이스

사이의 리소스 할당

우선순위를 결정

© 2011 Oracle Corporation 18

Page 19: Mixed workload mgmt for exadata

Instance Caging

© 2011 Oracle Corporation 19

Page 20: Mixed workload mgmt for exadata

0

4

8

12

16

20

24

28

32

CPU Allocations

Partitioning Approach

• 다른 업무에 의한 영향최소화

• 성능이 매우 중요한 경우에적합

• Database가 idle 상태이더라도, 해당 database가할당 받은 CPU를 다른database가 사용할 수 없음

Number

of CPUs on

Server

Instance A: 8 CPUs

Instance B: 4 CPUs

Instance C: 2 CPUs

Instance D: 2 CPUs

© 2011 Oracle Corporation 20

Page 21: Mixed workload mgmt for exadata

0

4

8

12

16

20

24

28

32

CPU Allocations

Over-Provisioning Approach

• 성능 저하가 치명적인영향을 미치지 않는 업무에적합

• Database에 부하가 발생할경우 CPU 경합의 발생 가능

• CPU 활용도를 최대하하는것이 목표인 경우

Number

of CPUs on

Server

Instance A: 8 CPUs

Instance B: 8 CPUs

Instance C: 4 CPUs

Instance D: 4 CPUs

© 2011 Oracle Corporation 21

Page 22: Mixed workload mgmt for exadata

Instance Caging Results

• 4 CPU server

• Workload is a mix of OLTP transactions, parallel queries, and DMLs from Oracle Financials

© 2011 Oracle Corporation 22

Page 23: Mixed workload mgmt for exadata

Putting it all Together

© 2011 Oracle Corporation 23

Page 24: Mixed workload mgmt for exadata

Mixed Workload Management리소스 플랜 정의, 모니터링, 수정

• Mixed Workload에 대한리소스 플랜 정의• 우선순위 설정

• 리소스 할당

• 리소스 할당 상한값 설정

• Workload 모니터링

• 필요에 따라 플랜 수정

워크로드실행

워크로드모니터링

워크로드플랜 수정

워크로드플랜 정의

© 2011 Oracle Corporation 24

Page 25: Mixed workload mgmt for exadata

Workload Management in Action

Reports Query Only

With Ad-Hoc

Parallel Queuing

CPU Resource Manager

I/O Resource Manager

Reports Query Response Time

(seconds)

© 2011 Oracle Corporation 25

Page 26: Mixed workload mgmt for exadata

요약

• Workload management는 Consolidation의 필요조건

• Server Consolidation

– Instance Caging을 통해 다수의 데이터베이스에 CPU 분산

• Mixed workloads 환경에서 각 워크로드 별 리소스 보장

– Database Resource Manager

– I/O Resource Manager

– Parallel Statement Queuing

• Storage consolidation

– IORM을 통해 다수의 데이터베이스에 디스크 대역폭 분산

© 2011 Oracle Corporation 26

Page 27: Mixed workload mgmt for exadata

For More Information

http://search.oracle.com

or

www.oracle.com/exadata

oracle exadata

© 2011 Oracle Corporation 27

Page 28: Mixed workload mgmt for exadata

© 2011 Oracle Corporation 28