Smart Flash Cache:
- Oracle Exadata Smart Flash Cache stores frequently access data in Flash Storage which is very fast than other storage. This happens automatically and user don’t need to take any action to use this feature.
- Flash Cache is Smart – it avoids caching data which will not be reused or which is too big to fit in cache.
- The Exadata Storage Server Software also provides the Exadata Smart Flash Logging feature to speed database log I/O
Area of Uses Smart Flash Cache
- Compute Nodes (Database) send I/O requests to the storage cells with predictive information is embedded into these request via iDB protocol.
- iDB protocol has the information about special I/O requests (like ‘RedoLog Write’, ‘BufferCache Read’, ‘ASM Cache IO’, ‘ControlFile Write’ or ‘Smart scan’) sending from database instance to Cell.
- Data and index block reads and writes will benefit significantly from a caching mechanism.
- Control file I/O, archive log I/O, RMAN DB backups and restores have no benefit from the use of caching.
How can Influence to use Smart Flash Cache:
- During creation of objects by using CELL_FLASH_CACHE parameter, we can influence to use smart Flash Cache.
- CELL_FLASH_CACHE – DEFAULT, KEEP, NONE
- DEFAULT – uses a prioritized Least-Recently-Used algorithm (the oldest data is aged out first)
- KEEP – changes the LRU algorithm by maintaining the data in the cache for as long as possible
- NONE disables the use of the Smart Flash Cache for that object
Note::: To prevent KEEP data from hogging the cache, no more than 80 percent of the configured cache is available for data tagged as KEEP.
Even we can enforce for a table or index to use Smart Flash Cache by using ALTER TABLE OR INDEX command:
- ALTER TABLE <TABLE_NAME> STORAGE(FLASH_CACHE [NONE|DEFAULT|KEEP])
- ALTER INDEX <INDEX NAME> STORAGE(FLASH_CACHE [NONE|DEFAULT|KEEP])
- Exadata Smart Flash Cache Compression feature has been introduced from Exadata Storage Server Software 11.2.3.3.
- Dynamically increases the capacity of the flash cache by transparently compressing data as it is loaded into the flash cache.
Smart Flash Cache Mode:
- Write Through Flash Cache Mode: Write-through mode is excellent for absorbing repeated random reads and commonly found in OLTP applications.
- Write Back Flash Cache Mode: Write-back mode is best for write-intensive applications and commonly found in OLAP applications.
Write Through Flash Cache Mode:
- Write through Flash Cache is default mode.
- Write-through mode is best suited to the random repeated reads commonly found in OLTP application.
- The data is written directly to the disk through 512 MB of battery-backed cache on the Exadata Cell disk controller without the intervention of flash.
- Acknowledgment is sent back to the database by CELLSRV via iDB protocol.
- Write performance neither improved nor diminished by this method.
- If the data block qualifies the caching criteria – it is written to flash cache.
- Subsequent read operations of the same data will benefit as data is now cached in Flash.
# WriteThrough is Default: [celladmin@exacell01 ~]$ dcli -g cell_servers -l celladmin cellcli -e "list cell attributes flashcachemode" exacell01: WriteThrough exacell02: WriteThrough
Steps to enable Write-Through Mode
CellCLI> ALTER FLASHCACHE ALL FLUSH CellCLI> DROP FLASHCACHE CellCLI> ALTER CELL SHUTDOWN SERVICES CELLSRV CellCLI> ALTER CELL flashCacheMode=WriteThrough CellCLI> ALTER CELL STARTUP SERVICES CELLSRV CellCLI> CREATE FLASHCACHE ALL
Write Back Flash Cache Mode
- Write-back mode is best for write-intensive applications.
- For many applications, most I/O is serviced by flash.
- If any application is write intensive and if one finds significant waits for “free buffer waits” or high IO times noted in AWR reports, then write back flash cache is the best suitable option.
- If problem is detected, I/O operations transparently fail over to mirrored copies of data also on flash.
How Write-back mode works:
- Suitable writes go to Flash only.
- Data is automatically written to disk as it ages out of the cache.
- Active data blocks can reside in flash indefinitely.
- Reads are handled the same way as in write-through mode.
Steps to enable Write-Back Mode
CellCLI> DROP FLASHCACHE CellCLI> ALTER CELL SHUTDOWN SERVICES CELLSRV CellCLI> ALTER CELL FhashCacehMode = WriteBack CellCLI> ALTER CELL STARTUP SERVICES CELLSRV CellCLI> CREATE FLASHCACHE ALL