Oracle/HP Best Practices Guide for HP IO Accelerators
Single-instance performance architectures 23
Setting up flash cache
Database Smart Flash Cache is an optional memory component in Oracle 11g Release 2 that you can
add if your database is running on Solaris with Exadata storage or on Oracle Enterprise Linux. It is an
extension of the SGA-resident buffer cache, providing a level 2 cache to the SGA, level 1 for database
blocks. It can improve response time and overall throughput.
The flash cache is an extension of the database buffer cache that is stored on a flash disk, a storage
device that uses flash memory. Only data buffered in the SGA can make its way into the Database Flash
Cache. The data is essentially aged out and written by DBWR into the flash cache device file.
A flash cache is an extension of the database buffer cache that lives on a flash disk, which is a solid state
storage device that uses flash memory.
Without flash cache, the database reuses each clean buffer in main memory as needed, overwriting it. If
the overwritten buffer is needed later, then the database must read it from magnetic disk.
With flash cache, the database can write the body of a clean buffer to the flash cache, enabling reuse of
its main memory buffer. The database keeps the buffer header in an LRU list in main memory to track the
state and location of the buffer body in the flash cache. If this buffer is needed later, then the database
can read it from the flash cache instead of from magnetic disk.
In an Oracle RAC environment, you must configure flash cache on either all or none of the database
instance nodes.
Enabling flash cache
Enabling the flash cache option requires setting two new flash cache parameters:
DB_FLASH_CACHE_FILE and DB_FLASH_CACHE_SIZE. On the OEL platform, Metalink patch
8974084.8 must be installed to enable flash cache.
If you try to enable the flash cache option on a non-supported platform, you receive the following error
message:
ORA-00439: feature not enabled: Server Flash Cache
ORA-01078: failure in processing system parameters
The DB_FLASH_CACHE_FILE parameter specifies the path and file name for the file to contain flash
cache, in either the operating system file system (such as /dev/fioa) or an Oracle ASM disk group
(such as +FCDG).
If the file does not exist, the database creates it during startup. The file must reside on a flash disk. If you
configure flash cache on a disk drive (spindle), the database might not open or performance might suffer.
The DB_FLASH_CACHE_SIZE parameter specifies the size of the flash cache. This value must be less
than or equal to the physical memory size of the flash disk device. This parameter can only be specified
at instance startup expressed as nG, indicating the number of gigabytes. You can dynamically change
this parameter to 0 (disabling the flash cache) after the database is started. You can re-enable flash cache
by setting this parameter to the original value when the database was started. Dynamic resizing of
DB_FLASH_CACHE_SIZE or re-enabling flash cache to a different size is not supported.
Sizing the flash cache
As a general rule, size the flash cache to be between two times and 10 times the size of the buffer cache.
Any multiplier less than two is not beneficial. If you are using automatic shared memory management,