Oracle9i Net Services Administrator's Guide Release 2 (9.2) Part Number A96580-02 |
|
|
View PDF |
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:
See Also:
|
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:
ADDRESS (ADD or ADDR)
DESCRIPTION (DES or DESC)
PROTOCOL (PRO or PROT)
Attribute | Description |
---|---|
|
Specify the network protocol address of the endpoint on which the dispatchers listen. |
|
Specify the network description of the endpoint on which the dispatchers listen, including the network protocol address. The syntax is as follows:
|
Specify the network protocol for which the dispatcher generates a listening endpoint. For example:
See Also: Oracle9i Net Services Reference Guide for further information about protocol address syntax |
The following attributes are optional:
CONNECTIONS (CON or CONN)
DISPATCHERS (DIS or DISP)
LISTENER (LIS or LIST)
MULTIPLEX (MUL or MULT)
POOL (POO)
SERVICE (SER or SERV)
SESSIONS (SES or SESS)
TICKS (TIC or TICK)
Attribute | Description |
---|---|
|
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 Solaris Operating System and Windows NT. |
|
Specify the initial number of dispatchers to start. The default is |
|
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 See Also: "Configuring Service Registration" for further information about the Important: Resolve the listener alias through a naming method, such as a For example, if the listener alias name is
listener_sales=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))
|
|
Use to enable the Oracle Connection Manager session multiplexing feature. If If If If See Also: "Enabling Session Multiplexing" |
|
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 If If If See Also: |
|
Specify the service names the dispatchers register with the listeners. If no values are specified, then service names specified with the |
|
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. |
|
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 The default is 1 second. 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. |
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 |
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.
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.
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.
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.
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 |
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)"
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)"
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 |
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:
(server=dedicated)
in the CONNECT_DATA
section. For example:
sales=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.acme.com)
(SERVER=dedicated)))
sqlnet.ora
file) can be configured with USE_DEDICATED_SERVER=on
. This adds (server=dedicated)
to the CONNECT_DATA
section of the connect descriptor the client uses.
Note: If |
See Also:
|