Skip Headers

Oracle9i Net Services Administrator's Guide
Release 2 (9.2)

Part Number A96580-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

14
Configuring Shared Server

The shared server architecture enables a database server to allow many user processes to share very few server processes, so the number of users that can be supported is increased. With shared server, many user processes connect to a dispatcher. The dispatcher directs multiple incoming network session requests to a common queue. An idle shared server process from a shared pool of server processes picks up a request from the queue. This means a small pool of server processes can serve a large number of clients.

This chapter describes how to configure shared server. It contains these topics:

Configuring Shared Server with the DISPATCHERS Parameter

To enable a shared server configuration, set the DISPATCHERS parameter in the database initialization parameter file.


Note:

Database Configuration Assistant enables you to configure this parameter.


After setting this parameter, restart the instance to enable shared server configuration. Set DISPATCHERS as follows:

dispatchers="(attribute=value)"

One of the following attributes is required to enable shared server:

Table 14-1 Required Attributes of the DISPATCHERS Parameter
Attribute Description

ADDRESS (ADD or ADDR)

Specify the network protocol address of the endpoint on which the dispatchers listen.

DESCRIPTION (DES or DESC)

Specify the network description of the endpoint on which the dispatchers listen, including the network protocol address. The syntax is as follows:

(DESCRIPTION=(ADDRESS=...))

PROTOCOL (PRO or PROT)

Specify the network protocol for which the dispatcher generates a listening endpoint. For example:

(PROTOCOL=tcp)

See Also: Oracle9i Net Services Reference Guide for further information about protocol address syntax

The following attributes are optional:

Table 14-2 Optional Attributes of the DISPATCHERS Parameter
Attribute Description

CONNECTIONS (CON or CONN)

Specify the maximum number of network connections to allow for each dispatcher.

The default is operating system specific. For example, 1024 is the default for Sun SPARC Solaris and Windows NT.

DISPATCHERS (DIS or DISP)

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

LISTENER (LIS or LIST)

Specify an alias name for the listeners with which the PMON process registers dispatcher information. Set the alias to a name which is resolved through a naming method.

The LISTENER attribute overrides the LOCAL_LISTENER and REMOTE_LISTENER initialization parameters. The LISTENER attribute only needs to be specified if its value is different from the values specified by the LOCAL_LISTENER and REMOTE_LISTENER parameters. Note that the LOCAL_LISTENER parameter has a default value of TCP/IP, port 1521.

See Also: "Configuring Service Registration" for further information about the LOCAL_LISTENER and REMOTE_LISTENER parameters

Important: Resolve the listener alias through a naming method, such as a tnsnames.ora file on the database server or an Oracle Names server.

For example, if the listener alias name is listener_sales with two listening endpoints of port 1521, and the chosen naming method is the local naming method, the entry in the tnsnames.ora file would look like the following:

listener_sales= 
(DESCRIPTION= 
   (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))
   (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))

MULTIPLEX (MUL or MULT)

Use to enable the Oracle Connection Manager session multiplexing feature.

If 1, ON, YES, TRUE, or BOTH is specified, then session multiplexing is enabled for both incoming and outgoing network sessions.

If IN is specified, then session multiplexing is enabled for incoming network sessions from clients.

If OUT is specified, then session multiplexing is enabled for outgoing network sessions.

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

See Also: "Enabling Session Multiplexing"

POOL (POO)

Use to enable connection pooling.

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

If ON, YES, TRUE, or BOTH is specified, enables connection pooling for both incoming and outgoing idle network connections. A default timeout of 10 ticks is used for both incoming and outgoing idle network connections.

If IN is specified, connection pooling is enabled for incoming idle network connections and the default timeout of 10 ticks is used for incoming idle network connections. IN can also be assigned a timeout in ticks value, such as (IN=20). If the numeric value of a specified timeout is 0 or 1, then the default value of 10 ticks is used.

If OUT is specified, connection pooling is enabled for outgoing idle network connections and the default timeout of 10 ticks is used for outgoing network connections. OUT can also be assigned a timeout in ticks value, such as (OUT=20). If the numeric value of a specified timeout is 0 or 1, then the default value of 10 ticks is used.

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

See Also:

SERVICE (SER or SERV)

Specify the service names the dispatchers register with the listeners. If no values are specified, then service names specified with the SERVICE_NAMES initialization parameter are used.

SESSIONS (SES or SESS)

Specify the maximum number of network sessions to allow for each dispatcher.

The default is operating system specific. Most operating systems have a default of 16 KB.

TICKS (TIC or TICK)

Specify the length of a network tick in seconds. A tick is the amount of time it takes for a message to be sent and processed from the client to the database server or from the database server to the client. The value set is multiplied with the POOL timeout value to get the total connection pool timeout.

The default is 15 seconds. For a fast network, Oracle Corporation recommends a tick size of ~1 second. For a slow network, Oracle Corporation recommends a tick size of ~3-4 seconds.

Setting the Initial Number of Dispatchers

The number of dispatchers started at instance startup is controlled by the DISPATCHERS attribute.


Note:

Unlike the number of shared server processes, the number of dispatchers does not change automatically. The number of dispatchers can be explicitly changed with the SQL statement ALTER SYSTEM. You can change the number of dispatchers in this manner up to a maximum limit specified by the MAX_DISPATCHERS parameter. See the Oracle9i SQL Reference for further information about the ALTER SYSTEM statement and the Oracle9i Database Performance Tuning Guide and Reference for further information about the DISPATCHERS parameter.


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

Calculating the Initial Number of Dispatchers

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

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

CEIL represents the number roundest to the next highest whole integer.

Example: Initial Number of Dispatchers

Assume a system that has:

In this case, the DISPATCHERS attribute for TCP/IP should be set to a minimum of four dispatchers and TCP/IP with SSL should be set to a minimum of three dispatchers:

DISPATCHERS="(PROTOCOL=tcp)(DISPATCHERS=4)(CONNECTIONS=1000)"
DISPATCHERS="(PROTOCOL=tcps)(DISPATCHERS=4)(CONNECTIONS=1000)""

Depending on performance, you may need to adjust the number of dispatchers.

Example: Dispatcher Address with IP Address

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

DISPATCHERS="(ADDRESS=(PROTOCOL=tcp)(HOST=144.25.16.201))
(DISPATCHERS=2)"

This starts two dispatchers that listen on host 144.25.16.201. Note that Oracle Net dynamically selects the TCP/IP port for the dispatcher.

Example: Dispatcher Address with PORT

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

DISPATCHERS="(ADDRESS=(PROTOCOL=tcp)
(HOST=144.25.16.201)(PORT=5000))(DISPATCHERS=1)"
DISPATCHERS="(ADDRESS=(PROTOCOL=tcp)
(HOST=144.25.16.201)(PORT=5001))(DISPATCHERS=1)"

Note:

You can specify multiple DISPATCHERS in the initialization file, but they must be adjacent to each other.


Enabling Connection Pooling

Connection pooling is a resource utilization feature that enables you to reduce the number of physical network connections to a dispatcher. This is achieved by sharing or pooling a set of connections among the client processes.

To configure connection pooling, set the DISPATCHERS parameter in the initialization parameter file with the POOL attribute and the following optional attributes:

Refer to the example in "Example: Initial Number of Dispatchers". Connection pooling can allow each dispatcher 1,000 connections and 4,000 sessions for TCP/IP and 2,500 sessions for TCP/IP with SSL. This reduces the configuration to one dispatcher for each protocol, as shown in the following:

DISPATCHERS="(PROTOCOL=tcp)(DISPATCHERS=1)(POOL=on)(TICK=1) (CONNECTIONS=1000)(SESSIONS=4000)"

DISPATCHERS="(PROTOCOL=tcps)(DISPATCHERS=1)(POOL=on)(TICK=1) 
(CONNECTIONS=1000)(SESSIONS=2500)"

See Also:

"Connection Pooling"

Allocating Resources

An Oracle database can be represented by multiple service names. Because of this, a pool of dispatchers can be allocated exclusively for clients requesting a particular service. This way, the mission critical requests may be given more resources and, thus, in effect increase their priority.

For example, the following initialization parameter file sample shows two dispatchers. The first dispatcher services requests for clients requesting sales.us.acme.com. The other dispatcher services requests only for clients requesting adminsales.us.acme.com.

SERVICE_NAMES=sales.us.acme.com
INSTANCE_NAME=sales
DISPATCHERS="(PROTOCOL=tcp)" 
DISPATCHERS="(PROTOCOL=tcp)(SERVICE=adminsales.us.acme.com)" 

Using Shared Server on Clients

If shared server is configured and a client connection request arrives when no dispatchers are registered, the requests can be handled by a dedicated server process (configured in the listener.ora file). If you want a particular client always to use a dispatcher, configure (server=shared) in the connect data portion of the connect descriptor. For example:

sales= 
(DESCRIPTION= 
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
  (CONNECT_DATA=
     (SERVICE_NAME=sales.us.acme.com)
     (SERVER=shared)))

If a dispatcher is not available, the client connection request is rejected.

See Also:

"Configuring Advanced Connect Data Parameters" to set the SERVER parameter

Overriding Shared Server on Clients

If the database is configured for shared server and a particular client requires a dedicated server, you can configure the client to use a dedicated server in one of the following ways:


Go to previous page Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback