The previous two lessons explained the function and configuration of the first four of seven init.ora parameters required to initialize the Oracle Shared Server.
This lesson examines the remaining three:
In Oracle 11g R2, the Multi-Threaded Server (MTS) parameters were renamed to reflect their role in the shared server architecture.
The equivalent parameters are:
mts_max_dispatchers
→ max_dispatchers
Controls the maximum number of dispatcher processes that can be created.
mts_servers
→ shared_servers
Specifies the number of shared server processes to be created when the instance starts. This parameter sets the baseline number of shared servers.
mts_max_servers
→ max_shared_servers
Defines the maximum number of shared server processes that can be dynamically created by the Oracle instance.
These updated names better align with Oracle's shared server architecture and maintain consistency across Oracle database versions.
Best practices in Oracle's shared server architecture. Here is a breakdown:
-
Shared Server Utilization:
- In scenarios where user requests are infrequent or lightweight, a single shared server process can handle multiple user sessions effectively, typically serving 10 to 20 users per shared server process.
- For scenarios with high processing demands per user, a lower user-to-server ratio is required to maintain performance. This means more shared server processes need to be available to handle the load.
-
Dynamic Adjustment of Shared Servers:
- Oracle dynamically manages the number of shared server processes:
- Additional shared servers are started automatically when demand increases.
- If shared server processes remain idle for an extended period, they are shut down automatically to conserve system resources.
-
Initial Shared Server Processes (
shared_servers
):
- The number of shared server processes specified in the
shared_servers
parameter are always allocated at instance startup, even if idle. This ensures baseline capacity for user requests.
- Setting this value too high can result in unnecessary overhead, such as higher memory usage and resource contention, particularly in low-demand situations.
Recommendation:
Start with a "conservative number of shared server processes" and let Oracle's dynamic behavior manage scaling based on workload. Monitor and adjust if necessary, ensuring performance is optimized without excessive resource consumption.
- Maximum number of shared server processes
The `max_shared_servers` parameter establishes during instance startup the maximum number of shared server processes that can be started for the duration of an instance.
In general, set this parameter to allow an appropriate number of shared server processes to handle the workload during peak activity.
Ensure the listener is running before starting the instance, as the listener reads the shared server configuration parameters during the instance startup process.
If changes are made to the listener or shared server configuration, they can often be applied dynamically without requiring a database restart.
In scenarios where the database instance must be restarted (bounced), restart the listener before starting the database instance to ensure shared server connections are configured properly. To perform administrative tasks, connect using a dedicated server connection by specifying `(SERVER=DEDICATED)` in the connection string to ensure exclusive access to the instance.
The next lesson discusses how to configure multiple listeners.