oracle smart flash cache
DESCRIPTION
Introduction to oracle 11gR2 smart flash cache new feature. And it includes some real production testing results.TRANSCRIPT
Oracle Smart Flash Cache
-- Fan Xiangrong
Wednesday, June 22, 2011
AgendaWhat’s SSD
Oracle Smart Flash Cache
POC Result
Exadata Smart Flash
Wiki
Q & A
Wednesday, June 22, 2011
What’s SSD
Wednesday, June 22, 2011
What’s SSD
SSD type
SLC & MLC
Cell -> page -> block -> Plane
NAND + Flash Controller + RAM
Wednesday, June 22, 2011
SSD Headache & Solutions
SSD write amplification
http://en.wikipedia.org/wiki/Write_amplification
SSD wear off
Write to new free blocks
Wiper
TRIM
Delay write & Combine Write
Wednesday, June 22, 2011
Oracle Smart Flash CacheIt’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 cache
Wednesday, June 22, 2011
Lifecycle of a data block
Wednesday, June 22, 2011
How to setupTwo 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
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 reads
Wednesday, June 22, 2011
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_blocksFROM v$bh b
SELECTSUM (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_blocksFROM v$bh b
Wednesday, June 22, 2011
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 enabled
Wednesday, June 22, 2011
POC Result -- IPTR2
Wednesday, June 22, 2011
POC Result -- UTC14
Wednesday, June 22, 2011
POC Result -- User11
Wednesday, June 22, 2011
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 mysql
Wednesday, June 22, 2011
Wiki!http://wiki.engrs.ebay.com/wiki/doku.php?id=11g_smart_flash_cache
http://www.oracle.com/technetwork/articles/systems-hardware-architecture/oracle-db-smart-flash-cache-175588.pdf
http://guyharrison.squarespace.com/blog/2009/11/24/using-the-oracle-11gr2-database-flash-cache.html
Wednesday, June 22, 2011