About Creating a TimesTen Instance That Uses Automatic systemd Management

systemd is a system and service manager for Linux operating systems. If you have a Linux system that supports both the System V init mechanism and systemd, you have choices as to how to manage the TimesTen daemon. This section focuses on systemd.

Note:

  • If TimesTen is managed by Oracle Clusterware, you cannot use systemd for automatic management of the TimesTen daemon.
  • Using systemd for automatic management of the TimesTen daemon is supported in TimesTen Classic only. It is not supported in TimesTen Scaleout.

systemd provides a service unit type to start and control daemons and their associated processes. systemd uses a systemd service unit configuration file, whose name ends in .service, to encode information about the daemon process. systemd then uses this information to control and manage the process.

The TimesTen full distribution provides a systemd service unit configuration file customized for TimesTen. Its purpose is to provide the necessary information so that systemd can automatically control and manage the TimesTen daemon. TimesTen makes this file available in the timesten_home/startup directory when the instance administrator creates the TimesTen instance. This file is called the TimesTen service file. It has the naming convention of tt_myinstance.service, where myinstance is the name of the TimesTen instance. The systemd service that is created from this TimesTen service file is called the TimesTen service. This TimesTen service, when enabled and started, allows for automatic management of the TimesTen daemon by systemd.

The TimesTen service file is in a format specific to the requirements of the systemd service unit configuration file and the settings have been customized for TimesTen. systemd ignores the memlock entries in the /etc/security/limits.conf file. These memlock entries control the amount of memory a user can lock and are important settings when configuring the operating system requirements for TimesTen. Instead of using the memlock entries in the /etc/security/limits.conf file, systemd uses the LimitMEMLOCK setting in the #Service Limit Settings section of the service unit configuration file (TimesTen service file). This setting and two other settings are important for your TimesTen environment. Modify them as appropriate.

These are the settings and their values:
  • LimitNOFILE: 65536

  • LimitMEMLOCK: infinity

  • TasksMax: 65536

For example, here is the section in the TimesTen service file:

% cat timesten_home/start/tt_myinstance.service
#
# Oracle TimesTen In-Memory Database
# Copyright (c) 2020, 2021, Oracle and/or its affiliates.
...
# Service Limit Settings
LimitNOFILE = 65536
LimitMEMLOCK = infinity
TasksMax=65536
...

Note:

Do not make any other modifications to this file. Doing so alters the systemd configuration for TimesTen.
The process for creating a TimesTen instance that uses automatic systemd management involves:
  • Configuring the TimesTen instance for systemd: The instance administrator uses the ttInstanceCreate utility with the -systemd option to create the TimesTen instance. Alternatively, the instance administrator can run the ttInstanceCreate utility interactively. When prompted with the Would you like to use systemd to manage TimesTen question, the instance adminstrator answers Yes (or takes the default).

  • Configuring the Linux kernel parameters: You must configure Linux kernel parameters after creating the TimesTen full instance. These include shmmax and shmmall shared memory kernel parameters, HugePages, semaphores, and the SHMMNI parameter.

  • Modifying the TimesTen service file:

    If necessary, the instance administrator modifies the LimitNOFILE, the LimitMEMLOCK, and the TasksMax settings in the # Service Limit Settings section of the timesten_home/startup/tt_myinstance.service Times Ten service file (where myinstance is the name of the TimesTen instance). This ensures the operating system limits requirements are met for the TimesTen environment.

  • Installing the TimesTen utility script:

    A TimesTen instance that is configured with systemd is not enabled automatically. The root user uses the timesten_home/bin/setuproot utility script with the -install  -systemd options to enable automatic management of the TimesTen instance by systemd.

Reference information: