Oracle7 Server Distributed Systems Volume I: Distributed Data
How SQL*Net Establishes Connections to a Prespawned Dedicated Server
Prestarted (commonly referred to as "prespawned") Oracle7 Servers are server processes that are pre-started by the Listener before any incoming connection request. They improve the time it takes to establish a connection on servers where the Multi-Threaded Server is not used or not supported on a given machine. Their use in a heavily loaded distributed system can be beneficial.
The following parameters must be specified for each SID to be prespawned and are located in their respective SID_DESC in the LISTENER.ORA file. They control how the server is spawned.
PRESPAWN_MAX | The maximum number of prespawned servers the listener creates. This value should be a large number and at least the sum of the POOL_SIZE for each protocol. |
POOL_SIZE | The number of unused prespawned server processes for the listener to maintain on the selected protocol. The number must be greater than zero, but no larger than the PRESPAWN_MAX value. Set this value to the average expected number of connections at any given time. |
TIMEOUT | The time that an inactive server process should wait for the next connection before it shuts down. This parameter is used to prevent server processes from being immediately shut down after a client disconnects. For greatest efficiency, provide a short time value for this parameter. |
An additional feature of prespawned servers is the ability to set specific parameters for each SID. Thus, systems with heavy use can be tailored to accommodate the larger number of connection requests by setting PRESPAWNED_MAX and POOL_SIZE to large values. Similarly, when systems require mostly shared connections, the number of prestarted servers can be set to a low value.
Following is the sequence of events that occur when you are using prestarted servers to service client connection requests.
1. The listener is started and listens on the addresses pre-configured in LISTENER.ORA, created by the network administrator using Network Manager.
2. The listener then spawns a series of server processes until it reaches the POOL_SIZE for each SID defined in LISTENER.ORA.
3. Each spawned server process performs a wildcard listen and provides the Listener with the wildcard address that it is listening on. The listener initially marks all pre-started servers as idle.
4. The client calls the pre-configured well-known address of
the listener.
5. The listener receives the connection request, performs the connection handshake and determines if the client is allowed to connect. If not, the listener refuse the connection and then resumes at step 9.
6. The listener issues a redirect message to the client containing on e of the wildcard listen addresses of the pre-spawned servers. The listener then logs that server as active.
7. The client dissolves the connection to the listener and then establishes a connection to the pre-spawned server using the address provided in the redirect message.
8. The listener spawned another server to replace the active pre-spawned server (provided the PRESPAWN_MAX value is greater than the number of pre-spawned server processes either active or idle).
9. The listener continues listening for incoming connections.
The above sequence of events continues until the PRESPAWN_MAX is reached, at which point the listener will cease spawning new servers.
When clients disconnect, the prespawned server associated with the client is returned to the idle pool. If then waits the length of time defined in the TIMEOUT parameter to be assigned to another client. If no client is handed to the pre-spawned server before TIMEOUT expires, the pre-spawned server shuts itself down.
See the Oracle Network Manager Administrator's Guide for more information.