|Oracle® TimesTen In-Memory Database Operations Guide
Part Number E13065-08
The Oracle TimesTen Data Manager daemon, which is the Oracle TimesTen Data Manager service on Windows, starts when TimesTen is installed. The daemon operates continually in the background.
Manages shared memory access
Coordinates process recovery
Keeps management statistics on what databases exist, which are in use, and which application processes are connected to which databases
Manages RAM policy
Application developers do not interact with the daemon directly. No application code runs in the daemon and application developers do not generally have to be concerned with it. Application programs that access TimesTen databases communicate with the daemon transparently using TimesTen internal routines.
The following sections discuss interaction with the TimesTen daemon on various platforms:
The Oracle TimesTen Data Manager service starts when you install the Oracle TimesTen Data Manager on your Windows system. To manually start and stop the Oracle TimesTen Data Manager service, you can use the
ttDaemonAdmin utility with the
-stop option, or the Windows Administrative Tools as follows:
Open Administrative Tools:
On Windows 2000 and XP, choose Start > Settings >Control Panel > Administrative Tools.
Double-click Services. All currently available services are displayed.
Select TimesTen Data Manager 11.2.1, then click the appropriate button to stop or start the service.
Note:You must have administrative privileges to start and stop the TimesTen service.
You must be the instance administrator to start and stop the TimesTen daemon.
The instance administrator must manually start and stop the daemon, after each system reboot, unless the
setuproot script has been run. To manually start and stop the TimesTen main daemon, you can use the
ttDaemonAdmin utility with the
root can start the daemon by executing the daemon startup script. The following table shows the location of the daemon startup script by platform.
|Platform||Location of daemon startup script|
A TimesTen application consists of a database that has been allocated shared memory, user connections, and possibly replication and cache agents for communication with other TimesTen or Oracle databases.
To shut down a TimesTen application, complete the following tasks:
Disconnect all user connections gracefully.
Shut down all replication and cache agents.
Unload the database from shared memory if it was manually loaded.
Stop the TimesTen daemon.
On Windows, the
ttendaemon.options file is located in the directory:
On UNIX, the
ttendaemon.options file is located in the directory:
The features that the
ttendaemon.options file controls are as follows:
The network interfaces on which the daemon listens
The minimum and maximum number of TimesTen subdaemons that can exist for the TimesTen instance
Whether or not the TimesTen Server is started
Whether or not you use shared memory segments for client/server inter-process communication
The number of Server processes that are prespawned on your system
The location and size of support and user logs
The maximum number of users for a TimesTen instance
Data access across NFS mounted systems. This is for Linux only.
TNS_ADMIN value for the Oracle Database. This option cannot be modified in this file.
ttmodinstall utility to make changes to the
ttendaemon.options file for most commonly changed options. See "ttmodinstall" in Oracle TimesTen In-Memory Database Reference. If you cannot use
ttmodinstall to change a particular option and must modify the
ttendaemon.options file directly, stop the TimesTen daemon before you change the file. Restart the TimesTen daemon after you have finished changing the file. To change TimesTen Server options, it is only necessary to stop the server. It is not necessary to stop the TimesTen daemon.
The rest of this section includes the following topics:
By default, the TimesTen main daemon, all subdaemons and agents listen on a socket for requests, using any available address. All TimesTen utilities and agents use the loopback address to talk to the main daemon, and the main daemon uses the loopback address to talk to agents.
-listenaddr entry in a separate line in the
ttendaemon.options file tells the TimesTen daemons to listen on the specific address indicated in the value supplied. The address specified with this option can be either a host name or a numerical IP address.
-listenaddr parameter exists for situations where a server has multiple network addresses and multiple network cards. In this case it is possible to limit the network addresses on which the TimesTen daemon is listening to a subset of the server's network addresses. This is done by making entries only for those addresses on which the daemon listens. These possibilities exist:
Given a situation where a server has a "public" network address that is accessible both inside and outside the local network and a "private" address that is accessible only within the local network, adding a
-listenaddr entry containing only the private address blocks all communications to TimesTen coming on the public address.
By specifying only the local host, the TimesTen main daemon can be cut off from all communications coming from outside the server and communicate only with local clients and subdaemons.
There is no relationship between TimesTen replication and the
-listenaddr parameter and there is no requirement for enabling the
-listenaddr parameter when replication is enabled. If replication is going to be used in an environment where
-listenaddr is enabled, then the replication nodes need to know the allowable network addresses to use. However, if no
-listenaddr parameter is enabled replication still works.
To explicitly specify the address on which the daemons should listen on a separate line in the
ttendaemon.options file, enter:
For example, if you want to restrict the daemon to listen to just the loopback address, you say either:
This means that only processes on the local machine can communicate with the daemon. Processes from other machines would be excluded, so you would not be able to replicate to or from other machines, or grant client access from other machines.
If you have multiple ethernet cards on different subnets, you can specify
-listenaddr entries to control which machines can connect to the daemon.
You can enter up to four addresses on which to listen by specifying the option and a value on up to four separate lines in the
ttendaemon.options file. In addition to the addresses you specify, TimesTen always listens on the loopback address.
By default, TimesTen uses the IPv4 protocol. To enable the daemon to listen on IPv6, you must enter on a separate line in the
You can specify an IPv6 address with the
-listenaddr6 option to enable IPv6.
-enableIPv6 option with one or more
-listenaddr6 options adds the IPv6 loopback interface to the list.
If you specify the
-enableIPv6 option without specifying any addresses with the
-listenaddr6 options, then the daemon listens on any IPv6 interface as well as any IPv4 interface.
The address specified with this option can be either a host name or a numerical IP address. See "Determining the daemon listening address" for specifics on the
If one or more
-listenaddr options are provided, the daemons listen on the specified IPv4 interfaces, with the IPv4 loopback address being added to the list if not specified. If only
-enableIPv6 is specified, the daemons listen on both the IPv4 ANY interface and the IPv6 ANY interface.
You can specify both
-listenaddr6 options. If you specify one or more
-listenaddr6 options, the daemons listen on the specified IPv4 or IPv6 interfaces, with both the IPv4 and IPv6 loopback interfaces being added if not specified. If the name resolver returns multiple IPv4 and/or IPv6 addresses for a name, the daemons listen on all of the names.
As the daemon operates, it generates error, warning and informational messages. These messages may be useful for TimesTen system administration and for debugging applications.
By default, informational messages are stored in the following:
A user error log that contains information you may need to see. Generally, these messages contain information on actions you may need to take.
A support log containing everything in the user error log plus information of use by TimesTen Customer Support.
The following options specify the locations and size of the support and user logs, as well as the number of files to keep stored on your system.
||Specifies the location for the support log file. The default file is
||The TimesTen main daemon automatically rotates the files once they get to a specific size. This option specifies the number of support log files to keep. The default is 10.|
||Specifies the maximum size of the support log file. The default is 10 MB.|
|Specifies the location and name of the user log file. The default file is
You may specify
||The TimesTen main daemon automatically rotates the files once they get to a specific size. This option specifies the number of user log files to keep. The default is 10.|
||Specifies maximum size of the user log. Default is 1MB.|
||On UNIX systems only, indicates that the date should be prepended to all messages|
If you have specified the Event Log as the location for your log messages, to view them follow these steps:
Open the Event Viewer window on your Windows Desktop.
From the Log menu, choose Application.
The window changes to display only log messages generated by applications. Any messages with the word "TimesTen" in the "Source" column were generated by the Oracle TimesTen Data Manager service.
To view any TimesTen message, double-click the message summary.
The message window is displayed. You can view additional messages by clicking Next , Previous, up or down arrows, depending on your version of Windows.
Note:You can also view messages using the
Possible name values are:
TimesTen uses subdaemons to perform the following:
Flush the transaction log buffer to disk.
Perform periodic checkpoints.
Implement the aging policies of various tables.
Find and break deadlocks.
Rollback transactions for abnormally terminated direct-mode applications.
Perform required background processing for the database.
The main TimesTen daemon spawns subdaemons dynamically as they are needed. You can manually specify a range of subdaemons that the daemon may spawn, by specifying a minimum and maximum.
At any point in time, one subdaemon is potentially needed for TimesTen process recovery for each failed application process that is being recovered at that time.
By default, the maximum number of subdaemons is 50.
By default, TimesTen spawns a minimum of 4 subdaemons. However, you can change these settings by assigning new values to the
-maxsubs options in the
By default, TimesTen systems cannot access data across NFS-mounted systems. On Linux x86 64-bit systems, you can access checkpoint and transaction log files on NFS-mounted systems.
To enable data access on NFS-mounted systems, on a separate line of the
ttendaemon.options file, add:
Note:TimesTen does not support the storage of trace files or user and support logs across NFS-mounted systems
To enable Linux large page support on TimesTen, on a separate line of the
ttendaemon.options file, add:
Size_in_MB is the
Hugepagesize value in
/proc/meminfo, specified in MB instead of KB.
HP-UX ccNUMA systems have non-uniform memory latency depending on the data location. Accessing data in a remote cell takes longer than accessing data in a local cell. To ensure the best results for TimesTen operations, set the
IPC_MEM_LOCAL and confine the TimesTen processes to the local cell.
To set the locality hint for the shared memory segment, on a separate line of the
ttendaemon.options file, add:
Legal values for
Only one value string can be specified at a time. If specified, TimesTen attempts to create the shared memory segment for all databases in the instance with the appropriate locality hint.
Note:This option only takes effect if the instance administrator has permission to access the memory resource.
The semantics of the hints are described in the man page for
shmget. The default behavior is to create the segment without the hint. Expect the default behavior if the daemon option is not specified or if it is specified incorrectly. To see whether a segment has been created with the hint, use the HP-UX
pstat facility. See the HP-UX man page for
This section includes the following topics:
The TimesTen Server is a child process of the TimesTen daemon that operates continually in the background. To modify the TimesTen Server options, you must:
Stop the TimesTen Server.
Modify the options in the
ttendaemon.options file as described in the following sections.
Restart the TimesTen Server.
portno entry in a separate line in the
ttendaemon.options file tells the TimesTen daemon to start the TimesTen Server and what port to use. The
portno is the port number on which the server will listen.
If the TimesTen Server is installed, you can enable or disable the TimesTen Server:
To enable the TimesTen Server, remove the comment symbol '#' in front of the
To disable the TimesTen Server, add a comment symbol '#' in front of the
Each TimesTen Client connection requires one server process. By default, a server process is spawned when a client requests a connection.
You can prespawn a pool of reserve server processes, making them immediately available for a client connection, thus improving client/server connection performance.
number entry in a separate line in the
ttendaemon.options file on the Server machine tells the TimesTen Server to create
number processes. If this option is not specified, no processes are prespawned and kept in the reserve pool.
When a new connection is requested, if there are no items in the server pool, a new process is spawned, as long as you have not met the operating system limit.
If you request more process than allowed by your operating system, a warning is returned. Regardless of the number of processes requested, an error does not occur unless a client requests a connection when no more are available on the system, even if there are no processes remaining in the reserve pool.
Changes to the TimesTen Server take effect when the Server is restarted.
By default, TimesTen creates only one connection to a Server for each child process. You can set multiple connects to a single TimesTen Server, either by using the Server connection attributes described in the Oracle TimesTen In-Memory Database Reference or by setting the TimesTen daemon options described in this section. These options enable you to set the number of connections to a TimesTen Server, the number of servers for each DSN and the size of each connection to the server.
Note:In the case that you have set both the Server connection attributes and these daemon options, the value of the Server connection attributes takes precedence.
To run a child server process in multithreaded mode so that a single server process can service multiple client connections to a database, add the following line to the
The possible values of
NumberOfClientConnections range from 1 to 2047, inclusive. The default value is 1, which indicates that the child server process runs in multi-process mode and, therefore, can service only one client connection.
To specify the desired number of child server processes to be spawned for a particular server DSN, add the following line to the
The possible values of
NumberOfChildServerProcesses range from 1 to 2047, inclusive. The default value is 1.
Client connections to a particular server DSN are evenly distributed in round-robin fashion to the child server processes that are spawned and assigned to the DSN. The number of child server processes assigned to the server DSN is greater than
NumberOfChildServerProcesses if the number of client connections to the DSN is greater than the maximum number of client connections per child server process multiplied by the desired number of child server processes spawned for a server DSN.
To set the size of the child server process thread stack for each client connection, add the following line to the
ThreadStackSize is specified in KB. The default is 128 KB on 32-bit systems and 256 KB on 64-bit systems. The
ThreadStackSize setting is ignored if the maximum number of client connections per child server process is 1 because the sole client connection will be serviced by the main thread of the child server process.
Note:These changes to the TimesTen Server do not occur until the TimesTen daemon is restarted.
By default, TimesTen uses TCP/IP communication between applications linked with the TimesTen Client driver and the TimesTen Server.
Where the client application resides on the same machine as the TimesTen Server, you can alternatively use shared memory for the inter-process communication (IPC).
This can be useful for performance purposes or to allow 32-bit client applications to communicate with a 64-bit database on the server. Before using shared memory as IPC verify that you have configured your system correctly. See "Installation prerequisites" in Oracle TimesTen In-Memory Database Installation Guide.
If the entry exists, add the
# symbol before the line in the
ttendaemon.options file to comment it out. The TimesTen Server is no longer started with shared memory IPC capability when the TimesTen daemon starts.
Note:TimesTen supports a maximum of 16 different instances of the shared memory IPC-enabled server. If an application tries to connect to more than 16 different shared memory segments it receives an ODBC error.
size entry in a separate line in the
ttendaemon.options file tells the TimesTen Server to create a shared memory segment of the specified size in MB.
If this entry is missing, the TimesTen Server creates a shared memory segment of 64MB.
An appropriate value for the shared memory segment depends on:
The expected number of concurrent client/server connections to all databases that belong to an instance of the TimesTen Server.
The number of concurrent allocated statements within each such connection.
The amount of data being transmitted for a query.
Some guidelines for determining the size of the shared memory segment include:
The maximum size allowed is 1 gigabyte.
TimesTen needs 1 MB of memory for internal use.
Each connection needs a fixed block of 16 KB.
Each statement starts with a block of 16 KB for the IPC. But this size is increased or decreased depending upon the size of the data being transmitted for a query. TimesTen increments the statement buffer size by doubling it and decreases it by halving it.
For example, if the user application anticipates a max of 100 simultaneous shared-memory-enabled client/server connections, and if each connection is anticipated to have a maximum of 50 statements, and the largest query returns 128 KB of data, use this formula to configure the
serverShmSize = 1 MB + (100 * 16) KB + (100 * 50 * 128) KB = 1 MB + 2 MB + 625 MB = 628 MB
This is the most memory required for this example. The entire memory segment would be used only if all 100 connections have 50 statements each and each statement has a query that returns 128 KB of data in a row of the result.
In this example, if you configured the
serverShmSize to 128 MB, either a new shared-memory-enabled client/server connection is refused by the TimesTen Server or a query may fail due to lack of resources within the shared memory segment.
Once configured, to change the value of the shared memory segment you must stop the TimesTen Server. Stopping the server detaches all existing client/server connections to any database that is associated with that instance of the TimesTen Server. The steps for modifying the value of the
-serverShmSize option are:
-noserverlog entry in a separate line in the
ttendaemon.options file tells the TimesTen daemon to turn off logging of connects and disconnects from the client applications.
If the TimesTen Server is installed, you can enable or disable logging of connect and disconnect messages by:
To enable logging, add a comment symbol '#' before the
To disable logging, remove the comment symbol '#' before the