shared server and dedicated server

本文探讨了数据库系统的两种主要架构:共享服务器架构与专用服务器配置。共享服务器通过分配多个连接请求到共享进程池中来提高资源利用率和支持更多用户。而专用服务器为每个用户进程提供独立的服务进程,即使在空闲状态下也会保持连接。

 

Shared Server Architecture 
Shared server architecture eliminates the need for a dedicated server process for each connection. A dispatcher directs multiple incoming network session requests to a pool of shared server processes. An idle shared server process from a shared pool of server processes picks up a request from a common queue, which means a small number of shared servers can perform the same amount of processing as many dedicated servers. 
Also, because the amount of memory required for each user is relatively small, less memory and process management are required, and more users can be supported. 


A number of different processes are needed in a shared server system: 

¡ö A network listener process that connects the user processes to dispatchers or dedicated servers (the listener process is part of Oracle Net Services, not Oracle). 
¡ö One or more dispatcher processes 
¡ö One or more shared server processes 

When an instance starts, the network listener process opens and establishes a communication pathway through which users connect to Oracle. Then, each dispatcher process gives the listener process an address at which the dispatcher listens for connection requests. At least one dispatcher process must be configured and started for each network protocol that the database clients will use. 

A request from a user is a single program interface call that is part of the user’s SQL statement. When a user makes a call, its dispatcher places the request on the request queue, where it is picked up by the next available shared server process. 
The request queue is in the SGA and is common to all dispatcher processes of an instance. The shared server processes check the common request queue for new requests, picking up new requests on a first-in-first-out basis. One shared server process picks up one request in the queue and makes all necessary calls to the database 
to complete that request. 
When the server completes the request, it places the response on the calling dispatcher’s response queue. Each dispatcher has its own response queue in the SGA. The dispatcher then returns the completed request to the appropriate user process. 

NOTE£ºThe listener process is not part of an Oracle instance; rather, it is part of the networking processes that work with Oracle. 

Oracle dynamically adjusts the number of shared server processes based on the length of the request queue. The number of shared server processes that can be created ranges between the values of the initialization parameters SHARED_SERVERS and MAX_ SHARED_SERVERS. 

Certain administrative activities cannot be performed while connected to a dispatcher process, including shutting down or starting an instance and media recovery. An error message is issued if you attempt to perform these activities while connected to a dispatcher process. 

================================================================================= 

Dedicated Server Configuration 

The user and server processes are separate, distinct processes. The separate server process created on behalf of each user process is called a dedicated server process (orshadow process), because this server process acts only on behalf of the associated user process. 
This configuration maintains a one-to-one ratio between the number of user processes and server processes. Even when the user is not actively making a database request, the dedicated server process remains (though it is inactive and can be paged out on some operating systems).




 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值