Oracle sessions,processes 和 transactions 参数 关系 说明(一)

2014-11-24 08:58:41 · 作者: · 浏览: 0

一.官网说明

1.1 processes

11gR2 的文档:

Property

Description

Parameter type

Integer

Default value

100

Modifiable

No

Range of values

6 to operating system dependent

Basic

Yes

Oracle RAC

Multiple instances can have different values.

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

The defaultvalues of the SESSIONS and TRANSACTIONS parameters arederived from this parameter. Therefore, if you change the valueof PROCESSES, you should eva luate whether to adjust the values of thosederived parameters.

http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams198.htm#REFRN10175

1.2 sessions

11gR1:

http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams220.htm#REFRN10197

Property

Description

Parameter type

Integer

Default value

Derived: (1.1 * PROCESSES) + 5

Modifiable

No

Range of values

1 to 231

Basic

Yes

11gR2

Property

Description

Parameter type

Integer

Default value

Derived: (1.5 * PROCESSES) + 22

Modifiable

No

Range of values

1 to 231

Basic

Yes

这里要注意的是到了11gR2里,sessions 的默认值计算方式变了。 该值的计算是针对dedicate 模式的。

SESSIONS specifies the maximum number of sessions that can becreated in the system. Because every login requires a session, this parametereffectively determines the maximum number of concurrent users in the system.You should always set this parameter explicitly to a value equivalent to yourestimate of the maximum number of concurrent users, plus the number ofbackground processes, plus approximately 10% for recursive sessions.

Oracle uses thedefault value of this parameter as its minimum. Values between 1 and thedefault do not trigger errors, but Oracle ignores them and uses the defaultinstead.

The defaultvalues of the ENQUEUE_RESOURCES and TRANSACTIONS parametersare derived from SESSIONS. Therefore, if you increase the valueof SESSIONS, you should consider whether to adjust the valuesof ENQUEUE_RESOURCES and TRANSACTIONS as well. (Notethat ENQUEUE_RESOURCES is obsolete as of Oracle Database 10g release2 (10.2).)

In a shared server environment, the value of PROCESSES canbe quite small. Therefore, Oracle recommends that youadjust the value of SESSIONS to approximately 1.1 * total numberof connections.

1.3 transactions

11gR2

http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams258.htm#REFRN10222

Property

Description

Parameter type

Integer

Default value

Derived: (1.1 * SESSIONS)

Modifiable

No

Range of values

4 to 232

Oracle RAC

Multiple instances can have different values.

TRANSACTIONS specifieshow many rollback segments to onlinewhen UNDO_MANAGEMENT = MANUAL. The maximum number of concurrenttransactions is now restricted by undo tablespace size(UNDO_MANAGEMENT = AUTO) or the number of online rollback segments(UNDO_MANAGEMENT = MANUAL).

二. 测试

2.1 测试DB版本

SQL> select * from v$version;

BANNER

-----------------------------------------------------------------------

Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - Production

PL/SQL Release 11.2.0.1.0 - Production

CORE 11.2.0.1.0 Production

TNS for 32-bit Windows: Version 11.2.0.1.0- Production

NLSRTL Version 11.2.