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.
-
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.-
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 thettInstanceCreate
utility interactively. When prompted with theWould you like to use systemd to manage TimesTen
question, the instance adminstrator answersYes
(or takes the default). -
Configuring the Linux kernel parameters: You must configure Linux kernel parameters after creating the TimesTen full instance. These include
shmmax
andshmmall
shared memory kernel parameters, HugePages, semaphores, and theSHMMNI
parameter. -
Modifying the TimesTen service file:
If necessary, the instance administrator modifies the
LimitNOFILE
, theLimitMEMLOCK
, and theTasksMax
settings in the# Service Limit Settings
section of thetimesten_home/startup/tt_myinstance.service
Times Ten service file (wheremyinstance
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 thetimesten_home/bin/setuproot
utility script with the-install
-systemd
options to enable automatic management of the TimesTen instance by systemd.
-
https://www.freedesktop.org/software/systemd/man/systemd.service.html for information on systemd.service - Service unit configuration.
-
https://www.freedesktop.org/software/systemd/man/systemd.exec.html for information on systemd.exec - Execution environment configuration. This is important for the
LimitNOFILE
and theLimitMEMLOCK
settings. -
https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html for information on systemd.resource-control - Resource control unit settings. This is important for the
TasksMax
setting. -
"ttInstanceCreate" in the Oracle TimesTen In-Memory Database Reference for information on the TimesTen
ttInstanceCreate
utility.