This page contains best practice recommendations for your Operating System hosting Oracle TimesTen.
- Supported Operating Systems
- Memory Kernel Parameters
- System Wide Resource Use
- MemoryLock
- Semaphores
- OS TCP buffer windows
Supported Operating Systems
- Supported OS versions for the current release of Oracle TimesTen are found in the Oracle TimesTen In-Memory Database Release notes.
- The latest OS certification information for all Oracle TimesTen releases is available on My Oracle Support Certifications (support.oracle.com).
Memory Kernel Parameters
The required kernel parameter settings vary between Operating Systems so please refer to the Oracle TimesTen In-Memory Database Installation Guide on how to set the appropriate parameters on your platform. Below is a guide for the most commonly used ones.
- shmmax - the maximum size of a shared memory segment. Needs to be large enough to accommodate the shared memory segment used for your Oracle TimesTen In-Memory database. The size of which is calculated as PermSize+TempSize+LogBuffSize+64MB overhead.
In Linux to view your current setting of shmmax run the OS command
$ ipcs -lm
Refer to the Installation Guide - Shared Memory section on how to set shmmax for your OS if required. - shmall - the total size of Shared Memory Segments System wide set in pages. The key thing to remember here is the value of shmmax is set in "bytes" but the value of shmall is set in "pages". Shmall should always be less than the physical memory on the box. In Linux to see what the total memory is run the following OS command
$ cat /proc/meminfo
Refer to the Installation Guide - Shared Memory section on how to set shmall for your OS if required. - Hugepages - a mechanism that allows the kernel to utilise the multiple page size capabilities of modern hardware architectures. Hugepages are beneficial in two situations.
1 - With large Oracle TimesTen databases. In fact it's mandatory to use Hugepages if your database is greater than 256GB because Linux cannot fall back and use regular pages because they cannot be backed by swap. When segment size is <256 GB it can be swapped, but the Linux limit on swap space is 256 GB.
2 - With smaller Oracle TimesTen databases that have a large number of server processes.
You need enough memory allocated in Hugepages to accommodate your Oracle TimesTen database shared memory segment size. For Oracle TimesTen to utilise Hugepages the kernel and Oracle TimesTen must be configured correctly. Refer to the Installation Guide - Large Pages section on how to configure Hugepages and Oracle TimesTen for your OS if required.
The above is only relevant for the Linux Operating System. For Solaris you need to create a project to manage shared memory resources as explained in the Installation Guide - Solaris prerequisites section. Other Operating Systems are discussed in the Installation Guide - Installation prerequisites section.
System wide resource use
- ulimit - a mechanism to restrict the amount of system resources a process can consume. Your instance administrator user, the user who installed Oracle TimesTen needs to be allocated enough lockable memory resource to load and lock your Oracle TimesTen shared memory segment.
This is configured with the memlock entry in the OS file /etc/security/limits.conf for the instance administrator.
To view the current setting run the OS command
$ ulimit -l
and to set it to a value dynamically within the boundary set by /etc/security/limits.conf use
$ ulimit -l <value>
Once changed you need to restart the TimesTen master daemon for the change to be picked up.
$ ttDaemonAdmin -restart
Beware sometimes ulimit is set in the instance administrators "~/.bashrc" or "~/.bash_profile" file which can override what's set in /etc/security/limits.conf
MemoryLock
A best practice recommendation is to use MemoryLock=4 in the DSN attributes configured in your sys.odbc.ini file. This means that the shared memory segment used for your TimesTen database is not a candidate to be paged out by the operating system, it will be locked. Please see the Best Practice for Database Attributes for further information on setting MemoryLock
Semaphores
The kernel must be configured with sufficient semaphores to support the expected number of database connections plus all other semaphore usage within the system. Connections, a DSN attributre in your sys.odbc.ini file indicates the maximum number of user-specified concurrent connections to the database. TimesTen allocates one semaphore for each expected connection. If the number of connections exceeds the value of this attribute, TimesTen returns an error. Refer to the Installation Guide on how to set the appropriate SEM semaphore parameter based on your number of connections. Please see the Best Practice for Database Attributes for further information on setting connections.
OS TCP buffer windows
You should have your System Administrator look into configuring larger TCP send and receive buffer windows, particularly when you are using Replication. Please see the Best practice Guide for Replication for further advice in this area.