Timesten - Ram Policy

Timesten Component

About

TimesTen allows you to specify a RAM policy that determines when the database is loaded and unloaded from main memory. The policy options are:

Policy Default Description
InUse Yes Load the database on first connection and unload on last disconnect.
Inuse with RamGrace Keep the database in memory for a “grace period” after the last disconnect.
Always Keep the database in memory at all time and automatically load the database upon restart of the TimesTen daemon process.
Manual Load and unload the database manually

How to

Choose the RAM policy

  • The InUse policy is the default setting and is convenient, particularly for development use. A disadvantage of this policy is that the first connection of the application needs to wait for the database to be loaded. If you have a relatively large database and the application does not always have a connection to the database, you may incur unnecessary wait time when the database needs to be loaded.
  • The InUse with RamGrace policy is useful for applications with frequent periods of “idle” time where there is no connection to the database at all. Setting a “grace period” to keep the database in memory can avoid unnecessary load/unload operations.
  • The Manual policy gives the database administrator more control over when the TimesTen database is loaded and unloaded. For enterprise companies where the TimesTen database is managed as part of their operational procedure to support the TimesTen applications, this policy is commonly used in system startup and shutdown procedures.
  • The Always policy keeps the database in memory whenever the server is up or rebooted, independent of the applications. This policy is useful if you have multiple applications sharing the database.

Get the RAM Policy

Use the ttAdmin utility to set or get the RAM policy.

[oracle@Exalytics-01 ~]$ ttAdmin MyDSN
RAM Residence Policy            : inUse
Replication Agent Policy        : manual
Replication Manually Started    : False
Cache Agent Policy              : manual
Cache Agent Manually Started    : False

Once the Ram policy is changed with another value than the default, the ttstatus utility gives also the Ram Policy.

TimesTen status report as of Wed Jun 20 14:16:57 2012

Daemon pid 23522 port 53396 instance tt1122
TimesTen server pid 23531 started on port 53397
------------------------------------------------------------------------
Data store /u01/app/oracle/product/aggregate_store/tt_aggr_store/di_tt_aggr_store
There are no connections to the data store
.........
.........
.........
RAM residence policy: Always
Replication policy  : Manual
Cache Agent policy  : Manual
PL/SQL enabled.

Set the RAM Policy

Use the ttAdmin utility to set or get the RAM policy.

[oracle@Exalytics-01 ~]$ ttAdmin -ramPolicy always MyDSN
RAM Residence Policy            : always
Replication Agent Policy        : manual
Replication Manually Started    : False
Cache Agent Policy              : manual
Cache Agent Manually Started    : False





Discover More
Timesten Component
Timesten - How to (load|unload) the database in memory ?

The load of the database in memory is dependent of the ram policy. You can still manage it with the ttAdmin utility with the -ramLoad and -ramUnload option. It will place the database in memory,...
Timesten Component
Timesten - Start/Stop a database

The concept of starting and stopping a TimesTen in-memory database is different from that of a disk-based RDBMS. For TimesTen, a database is ready for use by an application after the database is loaded...
Timesten Component
Timesten - ttStatus Utility

With the ttStatus Utility, you can get information: on the database process such as the daemon on the connection on the replication policy on the cache agent policy where we can see that:...



Share this page:
Follow us:
Task Runner