process和session的总结

多个client process对应一个server process,如果数据库运行在共享服务器方式
一个client process对应一个server process,如果数据库运行在专用服务器方式

之所以,oracle服务端的session参数值会大于process参数值的原因是,一个process下的一个session可能会产生 recursive sessions 归会话

select paddr,count(sid)  from v$session group by paddr having count(sid)>1  --可以查到 一个process id可以对应好多个session id


Multiple sessions can exist concurrently for a single database user. user hr can have multiple connections to a database. In dedicated server connections, the database creates a server process on behalf of each connection. Only the client process that causes the dedicated server to be created uses it. In a shared server connection, many client processes access a single shared server process .

对于单个数据库用户,可以同时存在多个会话。 用户hr可以与数据库建立多个连接。 在专用服务器连接中,数据库为每个连接创建服务器进程。 只有导致创建专用服务器的客户端进程才会使用它。 在共享服务器连接中,许多客户端进程访问单个共享服务器进程。


session

A logical entity in the database instance memory that represents the state of a current user login to a database. A single connection can have 0, 1, or more sessions established on it .

数据库实例内存中的逻辑实体,表示当前用户登录数据库的状态。 单个连接可以在其上建立0,1或更多会话


process

A mechanism in an operating system that can run a series of steps. By dividing the work of Oracle Database and database applications into several processes, multiple users and applications can connect to a single database instance simultaneously.

Oracle processes include server processes and background processes.

操作系统中可以运行一系列步骤的机制。 通过将Oracle数据库和数据库应用程序的工作分成多个进程,多个用户和应用程序可以同时连接到单个数据库实例。

Oracle流程包括服务器进程和后台进程。


PROCESSES参数

PROCESSES specifies the maximum number of operating system user processes that can simultaneously connect to Oracle. Its value should allow for all background processes such as locks, job queue processes, and parallel execution processes.

The default values of the SESSIONS and TRANSACTIONS parameters are derived from this parameter. Therefore, if you change the value of PROCESSES, you should evaluate whether to adjust the values of those derived parameters.

PROCESSES指定可以同时连接到Oracle的最大操作系统用户进程数。 它的值应该允许所有后台进程,例如锁,作业队列进程和并行执行进程。

SESSIONS和TRANSACTIONS参数的默认值是从此参数派生的。 因此,如果更改PROCESSES的值,则应评估是否调整这些派生参数的值。


SESSIONS参数

SESSIONS specifies the maximum number of sessions that can be created in the system.Because every login requires a session, this parameter effectively determines the maximum number of concurrent users in the system. You should always set this parameter explicitly to a value equivalent to your estimate of the maximum number of concurrent users, plus the number of background processes, plus approximately 10% for recursive sessions .

In a shared server environment, the value of PROCESSES can be quite small. Therefore,Oracle recommends that you adjust the value of SESSIONS to approximately 1.1 * total number of connections.

SESSIONS指定可以在系统中创建的最大会话数。因为每次登录都需要会话,所以此参数有效地确定系统中的最大并发用户数。您应该始终将此参数显式设置为等于最大并发用户数的估计值,加上后台进程数, 再加上递归会话的大约10%

在共享服务器环境中,PROCESSES的值可能非常小。因此,Oracle建议您将SESSIONS的值调整为大约1.1 *总连接数。


Dedicated Server Processes

In dedicated server connections, the client connection is associated with one and only one server process (see "Dedicated Server Architecture"). On Linux, 20 client processes connected to a database instance are serviced by 20 server processes.

Each client process communicates directly with its server process. This server process is dedicated to its client process for the duration of the session. The server process stores process-specific information and the UGA in its PGA (see "PGA Usage in Dedicated and Shared Server Modes").

专用服务器连接中,客户端连接与一个且仅一个服务器进程相关联 (请参阅“专用服务器体系结构”)。在Linux上,连接到数据库实例的20个客户端进程由20个服务器进程提供服务。

每个客户端进程直接与其服务器进程通信。此服务器进程专用于会话期间的客户端进程。服务器进程在其PGA中存储特定于进程的信息和UGA(请参阅“专用和共享服务器模式下的PGA使用”)。


Shared Server Processes

In shared server connections, client applications connect over a network to a dispatcher process, not a server process (see "Shared Server Architecture"). For example, 20 client processes can connect to a single dispatcher process.

The dispatcher process receives requests from connected clients and puts them into a request queue in the large pool (see "Large Pool"). The first available shared server process takes the request from the queue and processes it. Afterward, the shared server place the result into the dispatcher response queue. The dispatcher process monitors this queue and transmits the result to the client.

Like a dedicated server process, a shared server process has its own PGA. However, the UGA for a session is in the SGA so that any shared server can access session data.

在共享服务器连接中,客户端应用程序通过网络连接到调度程序进程,而不是服务器进程(请参阅“共享服务器体系结构”)。例如,20个客户端进程可以连接到单个调度程序进程。

调度程序进程接收来自已连接客户端的请求,并将它们放入大型池中的请求队列中(请参阅“大型池”)。第一个可用的共享服务器进程从队列中获取请求并对其进行处理。之后,共享服务器将结果放入调度程序响应队列。调度程序进程监视此队列并将结果传输到客户端。

与专用服务器进程一样,共享服务器进程也有自己的PGA。但是,会话的UGA位于SGA中,因此任何共享服务器都可以访问会话数据。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-2134382/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30126024/viewspace-2134382/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值