Oracle/HP Best Practices Guide for HP IO Accelerators
Single-instance performance architectures 24
make the flash cache between two times and 10 times the size of SGA_TARGET. Using 80% of the size of
SGA_TARGET instead of the full size is sufficient.
Tuning memory for the flash cache
For each database block moved from the buffer cache to the flash cache, a small amount of metadata
about the block is kept in the buffer cache. For a single instance database, the metadata consumes
approximately 100 bytes. For an Oracle RAC database, it is closer to 200 bytes. You must therefore take
this extra memory requirement into account when adding the flash cache.
If you are managing memory manually, increase the size of the buffer cache by an amount approximately
equal to the number of database blocks that fit into the flash cache multiplied by 100 (or 200 for Oracle
RAC).
If you are using automatic memory management, increase the size of MEMORY_TARGET using the
algorithm previously described. You might have to increase the size of MEMORY_MAX_TARGET.
If you are using automatic shared memory management, increase the size of SGA_TARGET.
You can choose to not increase the buffer cache size to account for the flash cache. In this case, the
effective size of the buffer cache is reduced. However, you can offset this loss by using a larger flash
cache.
Using flash cache
When the flash cache option has been enabled, schema Table objects can specify the storage clause
option FLASH_CACHE in the CREATE TABLE statement.
The FLASH_CACHE clause lets you override the automatic buffer cache policy and specify how specific
schema objects are cached in flash memory. To use this clause, Database Smart Flash Cache (flash
cache) must be configured on your system. Because flash memory is faster than magnetic disks, the
database can improve performance by caching buffers in the flash cache instead of reading from
magnetic disk. The values for the FLASH_CACHE clause are KEEP, NONE, and DEFAULT.
• KEEP—Specify KEEP if you want the schema object buffers to remain cached in the flash cache as
long as the flash cache is large enough.
• NONE—Specify NONE to ensure that the schema object buffers are not cached in the flash cache.
This enables you to reserve the flash cache space for more frequently accessed objects.
• DEFAULT—Specify DEFAULT if you want the schema object buffers to be written to the flash cache
when they are aged out of main memory, and then be aged out of the flash cache with the standard
buffer cache replacement algorithm. This is the default if flash cache is configured and you do not
specify KEEP or NONE.
Example: Flash cache use
To enable and use flash cache with Oracle 11gR2 on OEL 5 64-bit:
1. Download and install Metalink Patch 8974084.8 - Patch to enable Oracle Database Smart Flash
Cache for OEL.
2. Set the following Oracle initialization parameters:
db_flash_cache_file='/dev/fioa1'