Presentation is loading. Please wait.

Presentation is loading. Please wait.

From Disk to Memory It’s 2016 Folks!

Similar presentations


Presentation on theme: "From Disk to Memory It’s 2016 Folks!"— Presentation transcript:

1 From Disk to Memory It’s 2016 Folks!
Phani Yenugu

2 About Me! Senior Enterprise Architect 23+ years in IT.
Worked with most of the OS/Server/Storage/Hardware technologies released since 1993. First Oracle version 6.4 in 1995. Exadata last 3+ years. TOGAF 9 Enterprise Architect. Certified Oracle 8i/9i/10g/11g DBA. Certified Solaris System Admin. Certified HP-UX System Admin. Hobbies: Building/Breaking/Building(and learn), Robots, Rubik’s Built digital Photo Frames before any major player in the market.

3 Disclaimer! The opinions expressed on the following slides are solely mine. Some comments/views may be dated due to version differences etc. Please contact vendor and their documentation. Stunts performed by professional (me or my team) in closed course (sandbox) and real track (Production). You can try in your closed course too! Just be aware and understand thoroughly before you run/try/implement in your real track!

4 Why move to Memory? Data Growth (More data means more ideas for business) Business Complexity (More channels, integrations etc.) Business is becoming more competitive. Users have no patience. So, time to Market is critical Current data retrieval methods are dated! Memory is cheap!

5 Oracle Architecture - SGA
Shared Pool Java Pool Buffer Cache Large Pool Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important. Introduce each of the major topics. To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next. Log Buffer Streams Pool

6 Life of a SQL Statement Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important. Introduce each of the major topics. To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.

7 Life of a SQL Statement Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important. Introduce each of the major topics. To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.

8 Oracle Architecture – Buffer Cache
Dirty List LRU List Pinned Buffers Dirty Buffers Free Buffers

9 I/O Types: Cached Direct

10 Multi path Software etc.
I/O Layers Direct I/O (ASM) Cached I/O USER Layer VFS Layer FS CACHE LVM Layer SCSI/Fiber Layer Multi path Software etc. HDD Layer (SAN)

11 SAN Setup

12 Inside a SAN Frame

13 FS 1 4 2 5 3 6 RAID 0 Blocks Striped DISK 1 DISK 2 1 4 2 5 3 6

14 FS 1 2 RAID 1 Blocks Mirrored 3 DISK 1 DISK 2 1 1 2 2 3 3

15 RAID 5 Blocks Striped and Mirrored 1 4 2 5 3 6 1 2 P 3 P 4 P 5 6 FS
DISK 1 DISK 2 DISK 3 1 2 P 3 P 4 P 5 6

16 RAID 5 is Good…..or is it?

17 RAID 5 Great for Reads But, double penalty for writes Risk of data loss if there are 2 bad blocks in 2 drives.

18 RAID 10 Blocks Mirrored and Striped 1 4 2 5 3 6 1 1 2 2 3 3 4 4 5 5 6
FS 1 4 2 5 3 6 RAID 10 Blocks Mirrored and Striped DISK 1 DISK 2 DISK 3 DISK 4 1 1 2 2 3 3 4 4 5 5 6 6

19 What is a block? Block sizes Linux (64bit) – 4k Oracle – 8k (standard) Data is retrieved in blocks. It may contain one or more rows Entire row (or rows) is sent back to buffer cache

20 Oracle Architecture – Buffer Cache
Dirty List LRU List Pinned Buffers Dirty Buffers Free Buffers

21 In-Memory In-Memory builds columnar structure. Possible to specify only the columns that are of interest

22 If there are DML changes they are reflected in In-Memory
No logging, so little overhead Quick scale-up and scale-out * Not persistent. DB recycle will lose the in-memory data.

23 In-Memory pools IMCU - In Memory Compression Unit
SMU - Snapshot Metadata Unit

24 In-Memory views v$im_segments # objects that are in memory
v$inmemory_area Allocation of IMCUs and SMUs (80/20) v$im_header # of rows in each IMCU

25 How to enable Run im_advisor Add memory to SGA
Configure inmemory_size (min. 100MB) Place tables in Memory (alter table <table_name> inmemory;) <options>

26 Recap Easy to implement. No application changes Low overhead
Easy scale-up and scale-out Best ROI Fast & Efficient Business value

27 I don’t have license(…neither budget)
Cannot be as effective but…. Get more memory (it’s cheap) Pin objects (db_cache_keep_size) Tune queries better (of course) Full Database Caching (12c) (alter database force full database caching;)

28 and one more….

29 Do you know? Redolog and Control file Block Size in Oracle
has always been 512 bytes. Even in 12c!

30 Check for yourself  SYS> select distinct blocksize from v$log;
512 Controlfile logblock size SYS> select max(lebsz) from sys.x$kccle; MAX(LEBSZ)

31 If you notice Controlfile Enqueue or Logfile Sync waits in your database

32 Make sure FS is NOT RAID 5 SAN Cache is NOT FULL Move to Direct I/O (ASM) Move to a FS with 512 Blocksize

33 THANK YOU!


Download ppt "From Disk to Memory It’s 2016 Folks!"

Similar presentations


Ads by Google