Managing TimesTen Client/Server Attributes
This section includes the following topics:
Modifying the TimesTen Server Attributes
The TimesTen server is a child process of the TimesTen daemon that operates continually in the background.
To modify the TimesTen server attributes, you must do the following:
- Stop the TimesTen server.
- Modify the attributes in the
timesten.conf
file as described in the following sections. - Restart the TimesTen server.
Controlling the TimesTen Server
The server_port=
portno
attribute
in the timesten.conf
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
listens.
Prespawning TimesTen Server Processes in TimesTen Classic
Each TimesTen client connection requires one server process. By default, a server process is spawned when a client requests a connection.
In TimesTen Classic, you can prespawn a pool of reserve server processes by setting
the server_pool
attribute in the timesten.conf
file on
the server system. These server processes are immediately available for a client
connection, which improves client/server connection performance.
The server_pool=
number
attribute in the
timesten.conf
file on the server system 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.
Specifying Multiple Connections to the TimesTen Server
By default, TimesTen creates only one connection to a server for each child server process. You can set multiple connections to a single TimesTen server, either by using the server connection attributes or by setting the TimesTen daemon attributes described in this section.
See Defining Server DSNs for TimesTen Server on a Linux or UNIX System or TimesTen Server Connection Attributes in the Oracle TimesTen In-Memory Database Reference.
Changes to TimesTen server settings do not occur until the TimesTen server is restarted. To restart the server, use the following command:
ttDaemonAdmin -restartserver
Note:
In the case that you have set both the server connection attributes and these daemon attributes, the value of the server connection attributes takes precedence.
The following sections describe how to configure multiple child server processes so that a single server process can service multiple client connections to a database.
Configuring the Maximum Number of Client Connections Per Child Server Process
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
max_conns_per_server
attribute to the timesten.conf
file.
max_conns_per_server=NumberOfClientConnections
See Defining Server DSNs for TimesTen Server on a Linux or UNIX System.
Configuring Connection Distribution Among Child Server Processes
To specify the number of child server processes for a particular server DSN that will
use round-robin connection distribution (when max_conns_per_server >1
),
add the servers_per_dsn
attribute to the timesten.conf
file.
servers_per_dsn=NumberOfChildServerProcesses
By default (value=1), the first max_conns_per_server
client
connection to a Server DSN is assigned to a single child server process, the next
max_conns_per_server connection
is assigned to a second child
server process and so on. See Defining Server DSNs for TimesTen Server on a Linux or UNIX System for a full description of how the
servers_per_dsn
and max_conns_per_server
attributes relate to each other to control how connections are distributed over server
processes.
Configuring the Thread Stack Size of the Child Server Processes
To set the size of the child server process thread stack for each client connection,
add the server_stack_size
attribute to the timesten.conf
file.
server_stack_size=ThreadStackSize
See Defining Server DSNs for TimesTen Server on a Linux or UNIX System.
Note:
These changes to the TimesTen server do not occur until the TimesTen daemon is restarted.
Controlling the TimesTen Server Log Messages
The noserverlog
attribute in the timesten.conf
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, change the value of the
noserverlog
attribute to1
. -
To disable logging, change the value of the
noserverlog
attribute to0
.