Oracle smart flash cache


Published on

Introduction to oracle 11gR2 smart flash cache new feature. And it includes some real production testing results.

Published in: Technology, News & Politics
1 Comment
1 Like
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Oracle smart flash cache

  1. 1. Oracle Smart Flash Cache -- Fan XiangrongWednesday, June 22, 2011
  2. 2. Agenda What’s SSD Oracle Smart Flash Cache POC Result Exadata Smart Flash Wiki Q&AWednesday, June 22, 2011
  3. 3. What’s SSDWednesday, June 22, 2011
  4. 4. What’s SSD SSD type SLC & MLC Cell -> page -> block -> Plane NAND + Flash Controller + RAMWednesday, June 22, 2011
  5. 5. SSD Headache & Solutions SSD write amplification SSD wear off Write to new free blocks Wiper TRIM Delay write & Combine WriteWednesday, June 22, 2011
  6. 6. Oracle Smart Flash Cache It’s a new feature of oracle 11gR2 The feature only exists on Solaris & Oracle Linux The idea is to use flash card as the second cache of oracle database Move blocks from memory to flash card when aging out blocks Look for blocks in flash cache before issue physical IO It only keep clean blocks Flash Cards Corruption or Crash doesn’t crash the database, oracle will disable the second cacheWednesday, June 22, 2011
  7. 7. Lifecycle of a data blockWednesday, June 22, 2011
  8. 8. How to setup Two parameters db_flash_cache_file: the path of the flash cache file. It can be a volume name,a file or an ASM disk group db_flash_cache_size: the size of flash cache, it can be dynamically set. Set it to 0 disables the cache (compatible=11.2 is not required)Wednesday, June 22, 2011
  9. 9. Which Database is suitable for this high IOPS database, IO is the bottleneck db file sequential read is the top wait event and uses most of CPU v$db_cache_advice indicates that expands db_cache_size helps reducing physical readsWednesday, June 22, 2011
  10. 10. Smart Flash Cache Statistics flash cache inserts physical read flash cache hits (part of physical reads) db flash cache single block physical reads Check how many flash cache blocks are in use SELECT SUM (CASE WHEN b.status LIKE flash% THEN 1 END) flash_blocks, SUM (CASE WHEN b.status LIKE flash% THEN 0 else 1 END) cache_blocks, count(*) total_blocks FROM v$bh b SELECT SUM (CASE WHEN b.status LIKE flash% THEN 1 END)*8/1024/1024 "flash_blocks(GB)", SUM (CASE WHEN b.status LIKE flash% THEN 0 else 1 END)*8/1024/1024 "cache_blocks(GB)", count(*) total_blocks FROM v$bh bWednesday, June 22, 2011
  11. 11. POC Plan Prepare a 1+1 VCS cluster with Flash Cards in the same path & same size Flash cache file is built as standard vxvm using striped volume Stage the two parameters in init.ora Failover database to this 1+1 vcs cluster After database startup, the feature is enabledWednesday, June 22, 2011
  12. 12. POC Result -- IPTR2Wednesday, June 22, 2011
  13. 13. POC Result -- UTC14Wednesday, June 22, 2011
  14. 14. POC Result -- User11Wednesday, June 22, 2011
  15. 15. Exadata Smart Flash Cache Exadata smart flash cache & oracle smart flash cache are totally different Exadata cache is in storage layer Exadata cache is a write-through cache It’s more like facebook flashcache tool for mysqlWednesday, June 22, 2011
  16. 16. Wiki! id=11g_smart_flash_cache systems-hardware-architecture/oracle-db- smart-flash-cache-175588.pdf 2009/11/24/using-the-oracle-11gr2-database- flash-cache.htmlWednesday, June 22, 2011