There are two techniques provided to manually use and manage the cache. The first enables the
pinning of objects in the flash cache. The second supports the creation of logical disks out of the
flash for the permanent placement of objects on flash disks.
Pinning Objects In The Flash Cache:
Preferential treatment over which database objects are cached is also provided with the Exadata
Smart Flash Cache. For example, objects can be pinned in the cache and always be cached, or an
object can be identified as one which should never be cached. This control is provided by the
new storage clause attribute, CELL_FLASH_CACHE, which can be assigned to a database table,
index, partition and LOB column.
There are three values the CELL_FLASH_CACHE attribute can be set to. DEFAULT specifies
the cache used for a DEFAULT object is automatically managed as described in the previous
section. NONE specifies that the object will never be cached. KEEP specifies the object should
be kept in cache.
For example, the following command could be used to pin the table CUSTOMERS in Exadata
Smart Flash Cache
ALTER TABLE customers STORAGE (CELL_FLASH_CACHE KEEP)
This storage attribute can also be specified when the table is created.
The Sun Oracle Exadata Storage Server will cache data for the CUSTOMERS table more
aggressively and will try keeping this data in Exadata Smart Flash Cache longer than cached data
for other tables. In the normal case where the CUSTOMERS table is spread across many Sun
Oracle Exadata Storage Servers, each Exadata cell will cache its part of the table in its own
Exadata Smart Flash Cache. Generally there should be more flash cache available than the
objects KEEP is specified for. This leads to the table being completely cached over time.
While the default behavior for sequential scans is to bypass the flash cache, this is not the case
when KEEP is specified. If KEEP has been specified for an object, and it is accessed via an
offloaded Smart Scan, the object is kept in and scanned from cache. Another advantage of the
flash cache is that when an object that is kept in the cache is scanned, the Exadata software will
simultaneously read the data from both flash and disk to get a higher aggregate scan rate than is
possible from either source independently.
Creating Flash Disks Out Of The Flash Cache:
When an Exadata cell is installed, by default, all the flash is assigned to be used as flash cache and
user data is automatically cached using the default caching behavior. Optionally, a portion of the
cache can be reserved and used as logical flash disks. These flash disks are treated like any
Exadata cell disk in the Exadata cell except they actually reside and are stored as non-volatile
disks in the cache. For each Exadata cell the space reserved for flash disks is allocated across
sixteen (16) cell disks – 4 cell disks per flash card. Grid disks are created on these flash-based cell
disks and the grid disks are assigned to an Automatic Storage Management (ASM) diskgroup.
The best practice would be to reserve the same amount of flash on each Exadata cell for flash
disks and have the ASM diskgroup spread evenly across the Exadata cells in the configuration
just as you would do for regular Exadata grid disks. This will evenly distribute the flash I/O load
across the Exadata cells and flash.
These high-performance logical flash disks be used to store frequently accessed data. To use
them requires advance planning to ensure adequate space is reserved for the tablespaces stored
on them. In addition, backup of the data on the flash disks must be done in case media recovery
is required, just as it would be done for data stored on conventional disks. This option is
primarily useful for highly write intensive workloads where the disk write rate is higher than the
disks can keep up with.