Exalytics uses TimesTen which is In-memory database for storing aggregations or even detail data to speed up report delivery. The reporting solution always has number of reporting tables which are candidates to be in memory (RAM), it requires careful planning and predefined policy for database. There may need to have different RAM policy for different database. This blog is an attempt to list down TimesTen RAM policies options.
TimesTen RAM Policy Example
TimesTen allows you to specify a RAM policy that determines when databases are loaded and unloaded from main memory. I would like to start with how to set up the RAM policy for the database.
This example sets the RAM policy to always for the database identified by the ttdata DSN:
% ttadmin –rampolicy always ttdata
RAM Residence Policy : always
Replication Agent Policy : manual
Replication Manually Started : False
Cache Agent Policy : manual
Cache Agent Manually Started : False
RAM Policy Options
There are number of options for RAM policies other than always which I have used in previous example.
The main RAM polices are supported by Time Ten are as follows
The database is loaded into memory when the first connection to the database is opened, and it remains in memory as long as it has at least one active connection. When the last connection to the database is closed, the database is unloaded from memory. This is the default policy.
INUSE WITH RAMGRACE
The database is loaded into memory when the first connection to the database is opened, and it remains in memory as long as it has at least one active connection. When the last connection to the database is closed, the database remains in memory for a "grace period." The database is unloaded from memory only if no processes have connected to the database for the duration of the grace period. The grace period can be set or reset at any time. It stays in effect until the next time the grace period is changed.
The database always stays in memory. If the TimesTen daemon is restarted, it automatically reloads the database. The database is always automatically reloaded unless an unrecoverable error condition occurs.
The database is manually loaded and unloaded by system administrators. Once loaded, TimesTen ensures that the database stays loaded until the administrator unloads the database or unless an unrecoverable error condition occurs.
Setting Up RAM Policies
A system administrator can set up RAM policy automatically or manually load or unload the database with either the ttAdmin utility or the C API RAM policy utilities.
Oracle Support Document
Oracle TimesTen In-Memory Database Operations Guide 11g Release 2 (11.2.2) - E21633-11
The RAM policy decision should be taken only after careful consideration. I hope you find this information useful.