How to size memory required for TimesTen In-memory Database?

466 views Asked by At

How do I figure out the right values for the memory parameters in TimesTen? How much memory do I need based on my tables and data?

1

There are 1 answers

0
AudioBubble On

A TimesTen database consists of two shared memory segments; one is small and is used exclusively by PL/SQL while the other is the main database segment which contains your data (tables, indexes etc.), temporary working space, the transaction log buffer and some space used by the system.

Attributes in the DSN definition set the size for these areas as follows:

PLSQL_MEMORY_SIZE - sets the size of the PL/SQL segment (default is 128 MB). If you do not plan to every use PL/SQL then you can reduce this to 32 MB. If you plan to make very heavy use of PL/SQL then you may need to increase this value.

LogBufMB - sets the size of the transaction log buffer. The default is 64 MB but this is too small for most production databases. A read-mostly workload may be able to get by with a value of 256 MB but workloads involving a lot of database writes will typically need 1024 MB and in extreme cases maybe as much as 16384 MB. When setting this value you should also take into account the setting (or default) for the LogBufParallelism attribute.

PermSize - sets the size for the permanent (persistent) database storage. This needs to be large enough to hold all of your table data, indexes, system metadata etc. and usually some allowance for growth, contingency etc.

TempSize - sets the value for the temporary memory region. This region is used for database locks, materialised tables, temporary indexes, sorting etc. and is not persisted to disk.

The total size of the main database shared memory segment is given by PermSize + TempSize + LogBufMB + SystemOverhead. The value for SystemOverhead varies from release to release but if you allow 64 MB then this is generally sufficient.

Documentation on database attributes can be found here: https://docs.oracle.com/database/timesten-18.1/TTREF/attribute.htm#TTREF114

You can estimate the memory needed for your tables and associated indexes using the TimesTen ttSize utility https://docs.oracle.com/database/timesten-18.1/TTREF/util.htm#TTREF369