Understanding SQL*Net
How SQL*Net Establishes Connections to a Prestarted Dedicated Server
Prestarted (commonly referred to as "prespawned") Oracle7 Servers are server processes that are prestarted 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.
Set the following parameters using Oracle Network Manager. They control how the server is prespawned.
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. |
You can set specific prespawned server 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 preconfigured 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 prestarted servers as idle.
4. The client calls the preconfigured 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 refuses the connection and then resumes at step 9.
6. The listener issues a redirect message to the client containing one of the wildcard listen addresses of the prespawned 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 prespawned server using the address provided in the redirect message.
8. The listener spawns another server to replace the active prespawned server (provided the PRESPAWN_MAX value is greater than the number of prespawned server processes active and 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. It then waits the length of time defined in the TIMEOUT parameter to be assigned to another client. If no client is handed to the prespawned server before TIMEOUT expires, the prespawned server shuts itself down.
See the Oracle Network Manager Administrator's Guide for more information on configuring this feature.