Net8 Administrator's Guide
Release 8.1.5

A67440-01

Library

Product

Contents

Index

Prev Next

9
Configuring Multi-Threaded Server

This chapter describes how to configure muli-threaded server (MTS).

Specific topics discussed are:

Overview

Consider an order entry system with a dedicated server architecture. A customer places an order as a clerk enters the order into the database. For most of the transaction, the clerk is on the telephone talking to the customer and the server process dedicated to the clerk's user process remains idle. The server process is not needed during most of the transaction, and the system is slower for other clerks entering orders because the idle server process is holding system resources.

The MTS architecture eliminates the need for a dedicated server process for each connection (see Figure 9-1). A small number of shared servers can perform the same amount of processing as many dedicated servers. Also, since the amount of memory required for each user is relatively small, less memory and process management are required, and more users can be supported.

Features such as connection pooling help increase user scalability by increasing the number of possible simultaneous connections to the database. See "Enabling Connection Concentration" and "Connection Pooling".

Figure 9-1 Oracle Multi-Threaded Sever Architecture

Configuring Oracle for Multi-Threaded Server Architecture

To set up your system in a MTS configuration, start the listener process and set the MTS_DISPATCHERS parameter in the initialization file (INITSID.ORA).



Note:

The Oracle Database Configuration Assistant, available on Windows NT and some UNIX platforms, allows you to configure this parameter.  


After setting this parameter, restart the instance, which at this point will use the MTS configuration. MTS_DISPATCHERS should be set in the following manner:

mts_dispatchers="(atttribute=value)"

One and only one of the following attributes is required: ADDRESS, DESCRIPTION, or PROTOCOL.

Attribute   Description  

ADDRESS (ADD or ADDR)  

The network protocol address of the end point which the dispatchers will listen.

See "Configuring Protocol Addresses" for further information about protocol address syntax.  

DESCRIPTION

(DES or DESC)  

The network description of the end point which the dispatchers will listen on, including the protocol. The syntax is as follows:

(description =(address=...))
 

PROTOCOL (PRO or PROT)  

Specifies the network protocol for which the dispatcher will generate a listening end point.  

The attributes CONNECTIONS, DISPATCHERS, LISTENER, MULTIPLEX, POOL, PRESENTATION, SERVICE, and TICKS are optional:

Attribute   Description  

CONNECTIONS (CON or CONN)  

The maximum number of network connections to allow for each dispatcher.

The default is operating-system specific.  

DISPATCHERS (DIS or DISP)  

The initial number of dispatchers to start. The default is 1.  

LISTENER (LIS or LIST)  

The network name of the listener with which the dispatchers will register. It should be set to a name which is resolved through a naming method. This attribute should be only specified if the listener is:

  • a non-default local listener

  • at a remote location

A non-default local listener may also be specified with the LOCAL_LISTENER parameter. Oracle Corporation recommends using the LISTENER attribute, as the Oracle Database Configuration Assistant does not support configuration of the LOCAL_LISTENER parameter.

Important: In order for the dispatcher to register its information with a non-default listener, the listener name specified must be resolved through a naming method, such as a TNSNAMES.ORA on the server or an Oracle Names server. The entry should only contain the address of the listener, not the service name information in the CONNECT_DATA portion.

For example, if the listener name is LIST1, the listening endpoint uses TCP/IP on port 1521, and the chosen naming method is the local naming method, the entry in the TNSNAMES.ORA would be:

listener1.us.oracle.com= 
(description= 
  (address= 
     (protocol= tcp)
     (host= sales2-pc) 
     (port= 1521)
  )

The Net8 Assistant does not allow you to configure a TNSNAMES.ORA without the CONNECT_DATA information. Therefore, Oracle Corporation recommends you create the TNSNAMES.ORA manually.  

MULTIPLEX (MUL or MULT)  

Used to enable Oracle Connection Manager's connection concentration feature.

If 1, ON, YES, TRUE, or BOTH is specified, then connection concentration is enabled for both incoming and outgoing network connections.

If IN is specified, the connection concentration is enabled for incoming network connections from the client.

If OUT is specified, the connection concentration is enabled for outgoing network connections from the client.

If 0, NO, OFF, or FALSE is specified, then connection concentration is disabled for both incoming and outgoing network connections.

Additional Information: See "Enabling Connection Concentration".  

POOL  

If a number is specified, then connection pooling is enabled for both incoming and outgoing network connections and the number specified is the timeout in ticks for both incoming and outgoing network connections.

If ON, YES, TRUE, or BOTH is specified, then connection concentration is enabled for both incoming and outgoing network connections and the default timeout of 10 will be used for both incoming and outgoing network connections.

Additional Information: See "Enabling Connection Pooling" and "Connection Pooling".  

PRESENTATION

(PRE or PRES)  

Enables support of specific presentation protocols, including:

  • Two-Task Common (TTC) for standard Net8 and Java Stored Procedures connections (Default)

  • General Inter-Orb Protocol (GIOP) for Enterprise Java Beans and CORBA Server connections that use the Internet Inter-Orb Protocol (IIOP)

IIOP is an implementation of GIOP over TCP/IP or TCP/IP with SSL. Valid values for GIOP presentation values include:

  • oracle.aurora.server.SGiopServer for session-based GIOP dispatcher connections. This presentation is valid for TCP/IP and TCP/IP with SSL.

  • oracle.aurora.server.GiopServer for standard GIOP dispatcher connections. This presentation is valid for TCP/IP and TCP/IP with SSL.

Each presentation requires a separate MTS_DISPATCHERS entry.

Additional Information: See "Configuring Java Option Connections".  

SERVICE (SER, SERV)  

The service name which the dispatchers register with the Net8 listeners. The SERVICE attribute overrides the SERVICE_NAMES parameter.  

SESSIONS (SES or SESS)  

The maximum number of network sessions to allow for each dispatcher.

The default is operating-system specific.  

TICKS  

The size of a network tick in seconds. The default is 15 seconds. This parameter is optional for connection pooling.  

See Oracle8i Tuning for further information on tuning MTS parameters.

Setting the Initial Number of Dispatchers

The number of dispatchers started at instance startup is controlled by the parameter MTS_DISPATCHERS. Estimate the number of dispatchers to start for each network protocol before instance startup.


Note:

Unlike the shared servers the number of dispatchers does not change dynamically. The number of dispatchers must be explicitly changed with the ALTER SYSTEM command. You can change the number of number of dispatchers in this manner up to a maximum limit of MTS_MAX_DISPATCHERS.

MTS_MAX_DISPATCHERS has a default value of 5. If the initial number of dispatchers, the sum of all dispatchers configured in multiple MTS_DISPACTHERS variable, configured at setup time is greater than the value specified for MTS_MAX_DISPATCHERS, then the system automatically resets MTS_MAX_DISPATCHERS to the larger number.  


The appropriate number of dispatchers for each instance depends upon the performance you want from your database, the host operating system's limit on the number of connections per process, (which is operating system dependent) and the number of connections required per network protocol.

The instance must be able to provide as many connections as there are concurrent users on the database system. After instance startup, you can start more dispatchers if needed.

Calculating the Initial Number of Dispatcher

Once you know the number of possible connections per process for your operating system, calculate the initial number of dispatchers to create during instance startup, per network protocol, using the following formula.

number                 maximum number of concurrent sessions
of           = CEIL   (--------------------------------------------------------------------------)
dispatchers                connections per dispatcher
    

For example, assume that your system typically has 900 users concurrently connected via TCP/IP and 600 users connected via SPX, and supports 255 connections per process. In this case, the DISPATCHERS attribute for TCP/IP should be set to a minimum of 4 dispatchers and SPX should be set to a minimum of 3 dispatchers:

mts_dispatchers="(protocol=tcp) (dispatchers=4)"
mts_dispatchers="(protocol=spx) (dispatchers=3)"

Examples

Example 1

To force the IP address used for the dispatchers, enter the following:

mts_dispatchers="(address=(partial=true)(protocol=tcp)(host=144.25.16.201))
(dispatchers=2)"
    

This will start 2 dispatchers that will listen in on HOST=144.25.16.201, which must be a card that is accessible to the dispatchers.

Example 2

To force the exact location of dispatchers, add the PORT as follows:

mts_dispatchers="(address=(partial=true)(protocol=tcp)
(host=144.25.16.201)(port=5000))(dispatchers=1)"
mts_dispatchers="(address=(partial=true)(protocol=tcp)
(host=144.25.16.201)(port=5001))(dispatchers=1)"


Note:

You can specify multiple MTS_DISPATCHERS in the INITSID.ORA file, but they must be adjacent to each other. Also, MTS_DISPATCHERS defaults to 1.  


Configuring Both Multi-Threaded Server and Dedicated Server Modes

Oracle8i release 8.1.5 supports MTS for GIOP and TTC presentations. (IIOP is an implementation of GIOP over TCP/IP.) Because each presentation requires its own MTS_DISPATCHERS entry in the INITSID.ORA to enable MTS connections, it is possible to configure MTS for IIOP clients and dedicated server for TTC clients. This is achieved by setting the MTS_DISPATCHERS parameter in the INITSID.ORA file with a GIOP presentation. Because dedicated server is the default behavior, no further configuration for TTC is required. A dedicated server will be used for all TTC client connections.

In the example below, two MTS_DISPATCHERS entries are configured for different GIOP presentation protocols, indicated by the PRESENTATION attribute:

mts_dispatchers="(protocol=tcp)
(presentation=oracle.aurora.server.SGiopServer)"
mts_dispatchers="(protocol=tcp)
(presentation=oracle.aurora.server.GiopServer)"

It is also possible to configure MTS for IIOP clients and TTC clients. This is achieved by setting separate entries for each presentation. In the example below, three MTS_DISPATCHERS entries are configured for:

Overriding Multi-Threaded Server Mode on the Client

If the network is configured for MTS and a particular client requires dedicated server mode, the TNSNAMES.ORA file can be configured with a net service name that uses a dedicated server. This is achieved with (SERVER=DEDICATED) in the CONNECT_DATA section of a connect descriptor:

net_service_name= 
(description= 
  (address= (protocol_address_information))
  (connect_data= 
     (service_name=service_name) 
     (server=dedicated)
  ) 
) 

See "Configuring Advanced Connection Attributes for a Net Service Name" to set the SERVER parameter.




Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index