Creating an Instance on Linux/UNIX: Basics

The information in the following section is relevant for TimesTen full instances. See "Creating a TimesTen Client Instance" and "Client-Only Installations and Instances" for information on creating TimesTen client instances.

This section discusses creating a full instance on:
  • A Linux/UNIX system that does not support systemd

  • A Linux system that supports both the System V init mechanism and systemd, but you have chosen either the SystemV init mechanism or have chosen to have the instance administrator control the TimesTen daemon at all times.

See "Using systemd to Manage a TimesTen Service" for information on creating a full instance when your choice is systemd.

To create a full instance:
  • Use the ttInstanceCreate utility located in the installation_dir/tt22.1.1.25.0/bin directory to create the instance. You can run the ttInstanceCreate utility on the command line, in a file, or interactively.

  • Configure Linux kernel parameters.

  • Optionally, run the timesten_home/bin/setuproot script with the -install option to have the TimeTen daemon automatically started at system startup and automatically stopped at system shutdown. This script copies the System V init scripts to the proper location (/etc/init.d). If you want the instance administrator to control the TimesTen daemon at system startup and at system shutdown, do not run this script.

Note:

  • Only the user who unpacked the distribution (the creator of the installation) can create an instance from the installation.

  • This user must be a member of the TimesTen users group.

  • This user creates the instance by running the ttInstanceCreate utility.

  • After creating the instance, this user becomes the instance administrator of the instance.

  • This user is the only user that can be the instance administrator of this instance and all other instances associated with the installation.

Perform the procedures in these sections:

Create a TimesTen Full Instance on Linux/UNIX

This section discusses the options you have to create a TimesTen full instance.

Create a Full Instance Interactively

If you are using systemd as a service, see "Using systemd to Manage a TimesTen Service" for details.

This example uses the ttInstanceCreate utility to create a full instance. No options are specified on the command line.

Navigate to the installation_dir/tt22.1.1.25.0/bin area of the installation directory and then run the ttInstanceCreate utility located in that directory. The ttInstanceCreate utility must be run from the installation directory. User input is shown in bold.

Note:

TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems. If you are using Oracle Linux for Arm, Oracle Clusterware messages do not appear in the ttInstanceCreate output.
% installation_dir/tt22.1.1.25.0/bin/ttInstanceCreate

NOTE: Each TimesTen instance is identified by a unique name.
      The instance name must be a non-null alphanumeric string, not longer
      than 255 characters.

Please choose an instance name for this installation? [ tt221 ] myinstance
Instance name will be 'myinstance'.
Is this correct? [ yes ]
Where would you like to install the myinstance instance of TimesTen? [ /home/ttuser ] /scratch/ttuser
Creating instance in /scratch/ttuser/myinstance ...

NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
      daemon port number must be the same across all TimesTen installations
      managed within the same Oracle Clusterware cluster.

NOTE: All installations that replicate to each other must use the same daemon
      port number that is set at installation time. The daemon port number can
      be verified by running 'ttVersion'.

The default port number is 6624.

Do you want to use the default port number for the TimesTen daemon? [ yes ]
The daemon will run on the default port number (6624).

In order to use the cache features in any TimesTen databases
created within this instance, you must set a value for the TNS_ADMIN
environment variable. It can be left blank, and a value can be supplied later
using <install_dir>/bin/ttInstanceModify.

Please enter a value for TNS_ADMIN (s=skip)? [  ] s
What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 6625 ]

Would you like to use TimesTen Replication with Oracle Clusterware? [ no ]

Would you like to use systemd to manage TimesTen? [ no ]

NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.

The startup script is located here :
        '/scratch/ttuser/myinstance/startup/tt_myinstance'

Run the 'setuproot' script :
        /scratch/ttuser/myinstance/bin/setuproot -install
This will move the TimesTen startup script into its appropriate location.

The 22.1 Release Notes are located here :
  'installation_dir/tt22.1.1.1.0/README.html'

Starting the daemon ...
TimesTen Daemon (PID: 9020, port: 6624) startup OK.
Instance created successfully.

You have successfully created the TimesTen full instance. Proceed to "Review the Instance Home Directory and Subdirectories" for next steps.

Create an Instance by Specifying Options on the Command Line

This example runs the ttInstanceCreate utility and specifies the name, the location, and the daemon port number on the command line. (The name of the directory specified in the -location option must exist prior to running the ttInstanceCreate utility.) See ttInstanceCreate in the Oracle TimesTen In-Memory Database Reference for the supported options.

% installation_dir/tt22.1.1.25.0/bin/ttInstanceCreate -name fullinstance1 
-location /scratch/ttuser/fullinstance1 -daemonport 6824
Creating instance in /scratch/ttuser/fullinstance1 ...
INFO: Mapping files from the installation to 
/scratch/ttuser/fullinstance1/install
 
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
 
The startup script is located here :
        '/scratch/ttuser/fullinstance1/startup/tt_fullinstance1
 
Run the 'setuproot' script :
        /scratch/ttuser/fullinstance1/bin/setuproot -install
This will move the TimesTen startup script into its appropriate location.
 
The 22.1 Release Notes are located here :
  '/installation_dir/tt22.1.1.25.0/README.html'

You have successfully created the TimesTen full instance. Proceed to Review the Instance Home Directory and Subdirectories for next steps.

Create an Instance Interactively with the -record Option

When creating an instance interactively, you can use the -record option to record the interactive prompts and responses into a batch file, which you can then use as a template for creating additional instances in batch mode. See "Create an Instance from Information Provided in a Batch File" for details.

This example illustrates how to use the ttInstanceCreate utility with the -record option.

% installation_dir/tt22.1.1.25.0/bin/ttInstanceCreate -record 
/swdir/TimesTen/ttinstances/instancecreatebatch

The instancecreatebatch batch file that is created contains input similar to the following for ttInstanceCreate.

Note:

TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems. If you are using Oracle Linux for Arm, Oracle Clusterware messages do not appear.
Please choose an instance name for this installation:ttuser1instanceint
Is this correct:y
Where would you like to install the ttuser1instanceint instance of 
TimesTen:/swdir/TimesTen/ttinstances
Please enter a unique port number for the TimesTen daemon (<CR>=list):27100
Please enter a value for TNS_ADMIN (s=skip):s
What is the TCP/IP port number that you want the TimesTen Server to listen 
on:27101
Would you like to use TimesTen Replication with Oracle Clusterware:n

Create an Instance from Information Provided in a Batch File

You can use the ttInstanceCreate -batch option to use a batch file with instructions for creation of an instance. You created such a file by running ttInstanceCreate with the -record option. See Create an Instance Interactively with the -record Option for information.

This example first uses a sample batch file that was created with the -record option. It then uses this sample batch file (instancecreatebatch) to create the instance.

Note:

TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems. If you are using Oracle Linux for Arm, Oracle Clusterware messages do not appear.
Please choose an instance name for this installation:ttuser1instancebat
Is this correct:y
Where would you like to install the ttuser1instancebat instance of 
TimesTen:/swdir/TimesTen/ttinstances
Please enter a unique port number for the TimesTen daemon (<CR>=list):29100
Please enter a value for TNS_ADMIN (s=skip):s
What is the TCP/IP port number that you want the TimesTen Server to listen 
on:29101
Would you like to use TimesTen Replication with Oracle Clusterware:n

Then to create the instance:

% installation_dir/tt22.1.1.25.0/bin/ttInstanceCreate -batch /swdir/TimesTen/ttinstances/instancecreatebatch

This results in the following output from ttInstanceCreate:

NOTE: Each TimesTen instance is identified by a unique name.
      The instance name must be a non-null alphanumeric string, not longer
      than 255 characters.
 
Instance name will be 'ttuser1instancebat'.
Creating instance in /swdir/TimesTen/ttinstances/ttuser1instancebat ...
TCP port 6624 is in use!
 
NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
      daemon port number must be the same across all TimesTen installations
      managed within the same Oracle Clusterware cluster.
 
** The default daemon port (6624) is already in use or within a range of 8
ports of an existing TimesTen instance. You must assign a unique daemon port
number for this instance. This installer will not allow you to assign another
instance a port number within a range of 8 ports of the port you assign below.
 
NOTE: All installations that replicate to each other must use the same daemon
      port number that is set at installation time. The daemon port number can
      be verified by running 'ttVersion'.
 
INFO: installation group ownership (ttVersion) is 'timesten'
 
In order to use the cache features in any TimesTen databases 
created within this instance, you must set a value for the TNS_ADMIN 
environment variable. It can be left blank, and a value can be supplied later
using <install_dir>/bin/ttInstanceModify.
 
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
 
The startup script is located here :
    '/swdir/TimesTen/ttinstances/ttuser1instancebat/startup/tt_ttuser1instancebat'
 
Run the 'setuproot' script :
        /swdir/TimesTen/ttinstances/ttuser1instancebat/bin/setuproot -install
This will move the TimesTen startup script into its appropriate location.
 
The 22.1 Release Notes are located here :
  '/swdir/TimesTen/ttinstallations/fullinstall/tt22.1.1.25.0/README.html'
 
Starting the daemon ...
TimesTen Daemon (PID: 7725, port: 29100) startup OK.

You have successfully created the TimesTen full instance. Proceed to "Review the Instance Home Directory and Subdirectories" for next steps.

Create an Instance Interactively for Oracle Clusterware

This example illustrates how to interactively create an instance and enable TimesTen replication with Oracle Clusterware. Since TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems, do not run this example if you are using Oracle Linux for Arm.

When prompted for the path to the Oracle Clusterware installation, you can either provide it or skip it. If you skip it, you can specify the path later using the ttInstanceModify -crs option. See "Change the Oracle Clusterware Configuration for an Instance" for information.

This example provides the path to the Oracle Cluster installation as /u01/app/crs_releasedir/grid, where crs_releasedir is a variable for the CRS release (for example, if the CRS release is 19.1.0, you could substitute, 19.1.0, such that the path would be /u01/app/19.1.0/grid).

There must be a valid Oracle Clusterware installation in the specified directory.

In this example, either the values entered or the defaults chosen are shown in bold.

% installation_dir/tt22.1.1.25.0/bin/ttInstanceCreate
 
NOTE: Each TimesTen instance is identified by a unique name.
      The instance name must be a non-null alphanumeric string, not longer
      than 255 characters.
 
Please choose an instance name for this installation? [ tt221 ] crsinstance
Instance name will be 'crsinstance'.
Is this correct? [ yes ] yes
Where would you like to install the crsinstance instance of TimesTen? 
[ /home/oracle ] /u02/ttinstances
Creating instance in /u02/ttinstances/crsinstance ...
 
NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
      daemon port number must be the same across all TimesTen installations
      managed within the same Oracle Clusterware cluster.
 
NOTE: All installations that replicate to each other must use the same daemon
      port number that is set at installation time. The daemon port number can
      be verified by running 'ttVersion'.
 
The default port number is 6624.
 
Do you want to use the default port number for the TimesTen daemon? [ yes ]
The daemon will run on the default port number (6624).
INFO: installation group ownership (ttVersion) is 'oinstall'
 
In order to use the cache features in any TimesTen databases 
created within this instance, you must set a value for the TNS_ADMIN 
environment variable. It can be left blank, and a value can be supplied later
using <install_dir>/bin/ttInstanceModify.
 
Please enter a value for TNS_ADMIN (s=skip)? [  ] s
What is the TCP/IP port number that you want the TimesTen Server to listen on? 
[ 6625 ]
 
Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] yes
 
A Clusterware installation was detected in /u01/app/crs_releasedir/grid
 
Please provide the path to the Oracle Clusterware installation on this machine 
(s=skip)? [ /u01/app/crs_releasedir/grid ]
 
NOTE: The TimesTen Clusterware agent port must be the same on all nodes
      of the cluster. Please refer to the TimesTen documentation for
      additional information.
 
Please enter a port number for the TimesTen Clusterware agent? [ 3574 ]
 
Executing '/u01/app/crs_releasedir/grid/bin/olsnodes' ...
Oracle Clusterware is currently configured on the following nodes :
 
1. tthost1
2. tthost2
 
NOTE: By default, all of the nodes listed above will be added to the TimesTen
      Replication with Oracle Clusterware configuration. You can also
      specify your own list of nodes based on the list above.
 
Would you like to specify a node list for TimesTen Replication with Oracle 
Clusterware? [ no ]
 
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
 
The startup script is located here :
        '/u02/ttinstances/crsinstance/startup/tt_crsinstance'
 
Run the 'setuproot' script :
        /u02/ttinstances/crsinstance/bin/setuproot -install
This will move the TimesTen startup script into its appropriate location.
 
The 22.1 Release Notes are located here :
  '/u02/tt22.1.1.25.0/README.html'
 
Starting the daemon ...
TimesTen Daemon (PID: 11839, port: 6624) startup OK.

Note:

The Oracle Clusterware installation was detected by TimesTen. The location is confirmed.

Review the Instance Home Directory and Subdirectories

You can review the instance home directory and subdirectories for informational purposes. When you create an instance, each instance includes these subdirectories under $TIMESTEN_HOME (Not all of the subdirectories are included in this list):

  • bin: TimesTen utilities and executables tailored and specific to the instance

    This includes ttenv.sh (or ttenv.csh), which sets environment variables appropriately for the TimesTen environment for your session, and setuproot.sh, which can be run as root to cause data instances to be automatically started whenever the operating system reboots.

    Note that ttenv also puts the bin directory in your path.

  • conf: Contains the timesten.conf file, which is the TimesTen instance configuration file

  • diag: Diagnostic output, including the daemon log and error log

  • info: Working directory of the TimesTen daemon, containing persistent state about the TimesTen instance

  • install: Symbolic link referencing the installation associated with this instance.

  • plsql: Contains this subdirectory:

    • utl_file_dir: The only directory that can be read from or written to by PL/SQL blocks using the UTL_FILE package

  • startup: Contains a script that can be added to /etc/init.d to cause the instance to be automatically started at system startup and stopped at system shutdown.

Configure Linux Kernel Parameters

This section discusses the Linux kernel parameters that you must configure after creating your TimesTen instance:

Note:

If you have chosen systemd to automatically manage the TimesTen daemon, see "Using systemd to Manage a TimesTen Service" for details on configuring kernel parameters for systemd.

Configure shmmax and shmall

You must configure Linux shared memory so that the maximum size of a shared memory segment (the shmmax memory kernel parameter) is large enough to contain the size of the total shared memory segment for the database. In TimesTen Classic, the entire database resides in a single shared memory segment. There is also a second memory segment used for PL/SQL.

On Linux, a shared memory segment consists of pages, where the default page size is normally 4 kB (4096 bytes). You can verify the default page size by running the getconf PAGESIZE command:

% getconf PAGESIZE
4096

Configure these shared memory kernel parameters to control the size of the shared memory segment:

  • shmmax: The maximum size of a single shared memory segment expressed in bytes. The value must be large enough to accommodate the size of the total shared memory segment for the database.

  • shmall: The total size of shared memory segments system wide expressed in pages. The value is expressed in multiples of the page size (4 kB) and shmall * pagesize must be greater or equal to the value of shmmax. It is recommended that you set the value of shmall to less than or equal to the total amount of physical RAM. To display the total amount of physical memory, run the Linux cat /proc/meminfo command.

Use the ttShmSize utility to determine the size of the shared memory segment. The ttShmSize utility uses the values of the PermSize, the TempSize, the LogBufMB and the Connections connection attributes (for a specified database) to determine this size. See ttShmSize in Oracle TimesTen In-Memory Database Reference for details on the ttShmSize utility and see PermSize, TempSize, LogBufMB, and Connections in Oracle TimesTen In-Memory Database Reference for details on each connection attribute.

For example, use the ttShmSize utility with the -connStr option to determine the size of the shared memory segment using the database1 DSN. Supply a PermSize value of 32GB (32768 MB), a TempSize value of 4 GB (4096 MB), a LogBufMB value of 1 GB (1024 MB) and a Connections value of 2048.
% ttShmSize -connstr "DSN=database1;PermSize=32768;TempSize=4096;LogBufMB=1024;Connections=2048"
The required shared memory size is 39991547720 bytes.

Note:

  • The -connStr option of the ttShmSize utility requires that you have defined a DSN in either the user .odbc.ini or the system sys.odbc.ini file. You may use any DSN. Note that for any connection attribute not specified in the -connStr option, ttShmSize uses the setting defined in either the user .odbc.ini file or the system sys.odbc.ini file for the specified DSN. If the connection attribute is missing from both the -connStr option and either the user .odbc.ini file or the sys.odbc.ini file, ttShmSize uses the default value for the connection attribute.

  • You can add a DSN to either the user .odbc.ini file of the user or the system sys.odbc.ini file. For example, to add the database1 DSN to the user .odbc.ini file of the current operating system user:

    % vi ~/.odbc.ini
    ...
    [database1]

To size shmmax and shmall:

  1. As the root user, edit the /etc/sysctl.conf file, modifying kernel.shmmax and kernel.shmall. Set shmmax to 39,991,547,720 bytes and shmall to 9,763,561 pages, which is shmmax/pagesize.
    % sudo vi /etc/sysctl.conf
    ...
    kernel.shmmax=39991547720
    kernel.shmall=9763561
    
  2. To reload the settings from the modified /etc/sysctl.conf file:
    % sudo /sbin/sysctl -p
    
  3. Run the Linux ipcs lm command to display the current shmmax and shmall settings. The max seg size (kbytes) is the shmmax value and the max total shared memory (kbytes) is the value of shmall times max number of segments.
    % ipcs -lm
     
    ------ Shared Memory Limits --------
    max number of segments = 4096
    max seg size (kbytes) = 39054246
    max total shared memory (kbytes) = 39054246
    min seg size (bytes) = 1

Note:

  • The settings for shmmax and shmall in these examples can be increased if there are other applications that require them to be greater.

  • If you are unsure of the size of your database, you can set shmmax and shmall to correspond to a percentage of the size of physical memory (such as 80%).

Configure HugePages

You can configure HugePages for more efficient memory management.

Once configured, the memory allocated for HugePages is taken from the total RAM on the Linux host and is not available for any other use. In addition, the HugePages memory segment is automatically locked and cannot be swapped to disk.

To configure HugePages, you need to know:

  • The maximum size of the shared memory segment for the database

  • The HugePages page size on your Linux host

  • The group ID of the instance administrator

Using the examples in the Configure shmmax and shmall section, where the value of shmmax value is 39,054,246 kB, and the Create the TimesTen Users Group section, where the group ID of the instanceadmin user is 10000:

  • The size of the total shared memory segment is is 39,054,246 kB.

  • The HugePages page size is 2048 KB. (This value is fixed for each platform and is not configurable.)

    To determine the HugePages page size, run the Linux cat /proc/meminfo|grep Hugepagesize command:

    % cat /proc/meminfo | grep Hugepagesize
    Hugepagesize:       2048 kB
    
  • The group ID is 10000.

    To determine the group ID of the instance administrator, log in as the instanceadmin user, and run the Linux id command:

    % id
    uid=55000(instanceadmin) gid=10000(g10000)groups=10000(g10000)
    

To configure HugePages:

  1. Determine the number of HugePages by dividing the size of the total shared memory segment (expressed in MB) by the value of Hugepagesize (expressed in MB). In this example, the total shared memory segment is 39,054,246 kB (~38,138 MB) and the Hugepagesize value is 2,048 kB (2 MB):
    38138 MB/ 2 MB = 19069 
  2. As the root user, edit the /etc/sysctl.conf file, and set vm.nr_hugepages to the number of HugePages and set vm.hugetlb_shm_group to the group ID of the instance administrator. The latter setting restricts access to HugePages to members of the group.
    % sudo vi /etc/sysctl.conf
    ...
    vm.nr_hugepages=19069
    vm.hugetlb_shm_group=10000
  3. Reload the settings from the modified /etc/sysctl.conf file:
    % sudo /sbin/sysctl -p
  4. To verify that you have configured HugePages correctly, run:
    % cat /proc/meminfo | grep HugePages
    HugePages_Total:   19069
    HugePages_Free:    19069
    ...

Note:

  • Because HugePages must be allocated in contiguous available memory space, the requested allocation may not be granted, or may be only partially granted, until after the host is restarted. Check the HugePages_Total and HugePages_Free values from /proc/meminfo. Restarting grants the full allocation, assuming enough memory is available in the host.

  • The TimesTen PL/SQL shared memory segment consumes some of the configured HugePages allocation, determined by the value of the PLSQL_MEMORY_SIZE connection attribute. See PLSQL_MEMORY_SIZE in the Oracle TimesTen In-Memory Database Reference for more information.

  • On Linux, the HugePages segment is automatically locked such that the memory segment is not a candidate to be swapped to disk. Therefore, if you configure HugePages, you do not need to set the MemoryLock connection attribute.

Modify the memlock Settings

The memlock entries in the /etc/security/limits.conf file control the amount of memory a user can lock. These entries are set at the system level and are different than the MemoryLock connection attribute setting.

Note:

If you are using systemd to manage a TimesTen service, you must set the LimitMEMLOCK setting in the systemd service unit configuration file. systemd ignores the values in the /etc/security/limits.conf file. See "Using systemd to Manage a TimesTen Service" for details.

If HugePages are configured, the memlock values must be large enough to accommodate the size of the shared memory segment or the database will not be loaded into memory.

For example, for the instanceadmin user, assuming a total shared memory segment size of 39,054,246 kB, set the memlock entries to 39054246:

  1. As the root user, edit the /etc/security/limits.conf file, and set the memlock entries to 39,054,246 kB for the instanceadmin user. This value indicates the total amount of memory the instanceadmin user can lock.
    % sudo vi /etc/security/limits.conf
    ...
    instanceadmin soft   memlock 39054246
    instanceadmin hard   memlock 39054246
  2. As the instanceadmin user, log out and log in again for the changes to take effect.

Set the Semaphore Values

TimesTen has an upper bound on the maximum number of connections to the database. The database connections consist of:

  • User connections: established by user applications

  • System connections: established internally by TimesTen (set at 48 connections)

  • Other required connections (set at 107 connections)

Each of these connections is assigned one semaphore, such that the total semaphores for a database are:

Total semaphores = user connections (N) + system connections (48) + 
                   other required connections (107)

Total semaphores = N + 155

The semaphore settings are located in the kernel.sem configuration directive in /etc/sysctl.conf:

kernel.sem = SEMMSL SEMMNS SEMOPM SEMMNI

where:

  • SEMMSL is the maximum number of semaphores per array. This value is related to the maximum number of connections. Configure this value to be 155 plus the number of simultaneous user connections.

  • SEMMNS is the maximum number of semaphores system wide. Use the formula SEMMNS = (SEMMNI * SEMMSL) as a guideline. However, in practice, SEMMNS can be much less than SEMMNI * SEMMSL.

  • SEMOPM is the maximum number of operations for each semop call.

  • SEMMNI is the maximum number of arrays.

Follow these steps to configure the SEMMSL and the SEMMNI settings. Ensure that the user is root:

  1. View the existing kernel parameter settings:
    # /sbin/sysctl -a | grep kernel.sem
    kernel.sem = 2500 320000 1000 1280
    
  2. Edit the /etc/sysctl.conf file, changing SEMMSL (the first of the four values in kernel.sem) to 155 plus the number of simultaneous user connections.

    In this example, assume the number of simultaneous user connections is 4000. Set the SEMMSL value to 4155 (=4000+155) or greater.

    In addition, change SEMMNI (the last of the four values in kernel.sem) to the value of SEMMSL plus the number of TimesTen-specific shared memory segments. (These shared memory segments include the TimesTen database and PL/SQL.) In this example, set SEMMNI to 4157 (=4155+2) or greater.

    Note:

    TimesTen uses the value of the Connections first connection attribute to determine the maximum number of simultaneous user connections that can be connected to the TimesTen database. TimesTen returns an error if the number of simultaneous user connections exceeds this value. The default value is the lesser of 2000 or (SEMMSL - 155). See "Defining Server DSNs for TimesTen Server on a Linux or UNIX System" in the Oracle TimesTen In-Memory Database Operations Guide for information on setting the Connections attribute. Also see Connections in the Oracle TimesTen In-Memory Database Reference for information on the Connections first connection attribute.
    # vi /etc/sysctl.conf
    ...
    ...
    kernel.sem = 4155 400000 2000 4157
    
  3. Reload the settings from the modified /etc/sysctl.conf file.
    # /sbin/sysctl -p

Note:

If you are using replication, the Linux platform for each host on which the master databases reside must have similar kernel settings for shared memory and semaphores. Specifically, the SEMMSL and SEMMNI settings must be large enough on all hosts that participate in an active standby replication scheme before the duplication is performed. In the event of a failover, the standby must be able to accommodate the active.

Set the SHMMNI Parameter

The SHMMNI value controls the number of shared memory segments that the host can create simultaneously. TimesTen creates a shared memory segment for the TimesTen database and a shared memory segment for PL/SQL. In addition, there is a small shared memory segment that is allocated for the duration of each client/server connection. This shared memory segment is created at connect time and is destroyed when the client/server connection is disconnected from the TimesTen database. There is one shared memory segment per client/server connection.

You must configure the SHMMNI parameter setting to account for the number of client/server connections. Set SHMMNI to a value that is greater than number of expected client/server connections. (Ensure to also take into account the TimesTen shared memory segment, the PL/SQL shared memory segment, and other programs that use shared memory.) As an example, if you expect there to be 8000 client/server connections, an appropriate value is 9000 or greater. A value of 9000 or greater is appropriate as TimesTen has system connections that are not included in the client/server connections count.

Follow these steps to configure the SHMMNI setting. Ensure that the user is root:

  1. View the existing SHMMNI parameter setting.
    # /sbin/sysctl -a | grep shmmni
    kernel.shmmni = 4096
  2. Edit the /etc/sysctl.conf file, changing kernel.shmmni to a value that is greater than the number of client/server connections. This example sets kernel.shmmni to 9000.
     vi /etc/sysctl.conf
    ...
    ...
    kernel.shmmni = 9000
    
  3. Reload the settings from the modified /etc/sysctl.conf file.
    # /sbin/sysctl -p

Note:

If you are using replication, the Linux platform for each host on which the master databases reside must have a similar SHMMNI kernel setting. Specifically, the SHMMNI setting must be large enough on all hosts that participate in an active standby replication scheme before the duplication is performed. In the event of a failover, the standby must be able to accommodate the active.

Start an Instance Automatically at System Startup with System V init Scripts

You have the option of having the TimesTen daemon started automatically at system startup and stopped automatically at system shutdown.

Note:

If you do not choose this option, the instance administrator controls the TimesTen daemon at all times.

To enable this option, the root user runs the TimesTen setuproot script with the -install option. The script is located in the timesten_home/bin directory. This script copies a set of scripts to the /etc/init.d directory.

Recall that there is information about this in the ttInstanceCreate output when it creates an instance. For example, for an instance named myinstance:

NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
 
The startup script is located here :
        '/swdir/TimesTen/ttinstances/myinstance/startup/tt_myinstance'
 
Run the 'setuproot' script :
        /swdir/TimesTen/ttinstances/myinstance/bin/setuproot -install
This will move the TimesTen startup script into its appropriate location.

The setuproot script operates according to the current setting of the TIMESTEN_HOME environment variable, which indicates the instance home directory.

In this example, timesten_home/bin is the current directory of the root user:

# echo $TIMESTEN_HOME
/swdir/TimesTen/ttinstances/myinstance
# $TIMESTEN_HOME/bin/setuproot -install
Would you like to install the TimesTen daemon startup scripts into /etc/init.d? 
[ yes ]
Copying /swdir/TimesTen/ttinstances/myinstance/startup/tt_myinstance to
 /etc/init.d
 
Successfully installed the following scripts :
/etc/init.d/tt_myinstance
/etc/rc.d/rc0.d/K45tt_myinstance
/etc/rc.d/rc1.d/K45tt_myinstance
/etc/rc.d/rc2.d/S90tt_myinstance
/etc/rc.d/rc3.d/S90tt_myinstance
/etc/rc.d/rc5.d/S90tt_myinstance
/etc/rc.d/rc6.d/K45tt_myinstance

Before you destroy the instance, root should run setuproot -uninstall.

# $TIMESTEN_HOME/bin/setuproot -uninstall
Would you like to uninstall the TimesTen daemon startup scripts in /etc/init.d? 
[ yes ]
 
Successfully deleted the following scripts :
/etc/rc.d/rc0.d/K45tt_myinstance
/etc/rc.d/rc1.d/K45tt_myinstance
/etc/rc.d/rc2.d/S90tt_myinstance
/etc/rc.d/rc3.d/S90tt_myinstance
/etc/rc.d/rc5.d/S90tt_myinstance
/etc/rc.d/rc6.d/K45tt_myinstance
/etc/init.d/tt_myinstance

Note:

If you do not run setuproot -uninstall before you destroy the instance, you must manually delete the files that were placed by setuproot -install.