10.7.1 Exadata Smart Flash Cache

Exadata Smart Flash Cache provides a caching mechanism for frequently-accessed data on each Exadata Cell. It is a write-through cache which is useful for absorbing repeated random reads, and very beneficial to online transaction processing (OLTP). It provides a mechanism to cache data in KEEP mode using database-side storage clause hints at a table or index level. The Exadata Smart Flash Cache area on flash disks is automatically created on Exadata Cells during start up.

Oracle Exadata Storage Servers are equipped with high-performance flash disks in addition to traditional rotational hard disks. These high-performance flash disks can be used to create Exadata grid disks to store frequently accessed data. It requires the user to do accurate space planning, and to place the most active tablespaces on the premium disks. The recommended option is to dedicate all or part of flash disk space for Exadata Smart Flash Cache. In this case, the most frequently-accessed data on the spinning disks are automatically cached in the Exadata Smart Flash Cache area on high-performance flash disks. When the database needs to access this data Oracle Exadata Storage Server fetches the data from Exadata Smart Flash Cache instead of getting it from slower rotational disks.

When a partition or a table is scanned by the database, Exadata Storage Server can fetch the data being scanned from the Exadata Smart Flash Cache if the object has the CELL_FLASH_CACHE attribute set. In addition to serving data from the Exadata Flash Cache, Exadata Storage Server also has the capability to fetch the object being scanned from hard disks.

The performance delivered by Exadata Storage Server is additive when it fetches scanned data from the Exadata Smart Flash Cache and hard disks. Exadata Storage Server has the ability to utilize the maximum Exadata Smart Flash Cache bandwidth and the maximum hard disk bandwidth to scan an object, and give an additive maximum bandwidth while scanning concurrently from both.

Oracle Database and Exadata Smart Flash Cache software work closely with each other. When the database sends a read or write request to Oracle Exadata Storage Server, it includes additional information in the request about whether the data is likely to be accessed again, and should be cached. For example, when writing data to a log file or to a mirrored copy, the database sends a hint to skip caching. When reading a table index, the database sends a hint to cache the data. This cooperation allows optimized usage of Exadata Smart Flash Cache space to store only the most frequently-accessed data.

Users have additional control over which database objects, such as tablespace, tables, and so on, should be cached more aggressively than others, and which ones should not be cached at all. Control is provided by the new storage clause attribute, CELL_FLASH_CACHE, which can be assigned to a database object.

For example, to pin table CALLDETAIL in Exadata Smart Flash Cache one can use the following command:

ALTER TABLE calldetail STORAGE (CELL_FLASH_CACHE KEEP)

Exadata Storage Server caches data for the CALLDETAIL table more aggressively and tries to keep this data in Exadata Smart Flash Cache longer than cached data for other tables. If the CALLDETAIL table is spread across several Oracle Exadata Storage Servers, then each one caches its part of the table in its own Exadata Smart Flash Cache. If caches are sufficient size, then CALLDETAIL table is likely to be completely cached over time.