Initialization parameter settings - processes and session


[Excerpted from jslfl 's Weibo, thanks for the summary of the great god, it is very helpful, so I bookmarked it] 1.
Among the limitations set by the initialization parameters of sessions, the most well-known estimate is that the sessions and processes
Sessions parameters specify that an Instance can be The number of simultaneous sessions, or in other words, the number of concurrent users who can log in to the database at the same time.
Usually, when we set this number, we need to consider how many concurrent users we may have connected to the database at the same time, add the number of processes in the background process, and finally multiply by 1.1.
For example, it is estimated that there may be 100 in the system at the same time If the user is connected to the database, then your session should be at least
(100 + 10) * 1.1 = 121.
When the concurrent users connected to the database have reached this value, and a new session is connected, the error

00018, 00000, "maximum number of sessions exceeded"
// *Cause: All session state objects are in use.
// *Action: Increase the value of the SESSIONS initialization parameter.

2. Processes
and Sessions are similar to the process parameter.
The Processes parameter specifies the number of processes that Instance can run simultaneously at the OS level. Based on the same considerations as the sessions setting, when we set the processes,
Also consider how many concurrent users we might have concurrently connecting to the database, plus the number of processes for background processes.
Of course, under the configuration of MTS (shared server), the determination of this value will be different.
It should be a common background process + the maximum number of shared server processes (max_shared_servers) + the maximum number of Dispatcher processes (max_dispatchers).
In addition, because in the window platform, Oracle exists in the form of a single process, and the Processes parameter becomes a limit to the Oracle process. The number of threads in.
When Oracle needs to start a new process and has reached the processes parameter, it will report an error:

00020, 00000, "maximum number of processes (%s) exceeded"
// *Cause: All process state objects are in use.
// * Action: Increase the value of the PROCESSES initialization parameter. 1). Modify the relationship between Oracle sessions and processes

through SQLPlus : sessions=1.1*processes + 5. Use sys and log in with sysdba privileges: SQL> show parameter processes; NAME TYPE VALUE






------------------------------------ ----------- ---------------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 150
SQL> alter system set processes=400 scope = spfile;
系统已更改。
SQL> show parameter processes;
NAME TYPE VALUE
------------------------------------ ----------- -----------------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 150
SQL> create pfile from spfile;
File has been created.


Restart the database, OK!

SQL> shutdown immediate;
the database has been shut down.
The database has been unloaded.
The ORACLE routine has been shut down.
SQL> startup
ORACLE routine has been started.

Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes The
database is loaded.
The database is already open.
SQL> show parameter processes;

NAME TYPE VALUE
------------------------------------ ----- ------ ----------------
aq_tm_processes integer 0
db_writer_processes                  integer     1
gcs_server_processes                 integer     0
job_queue_processes                  integer     10
log_archive_max_processes            integer     2
processes                            integer     400
SQL> show parameter session;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------
java_max_sessionspace_size           integer     0
java_soft_sessionspace_limit         integer     0
license_max_sessions                 integer     0
license_sessions_warning             integer     0
logmnr_max_persistent_sessions       integer     1
session_cached_cursors integer 0
session_max_open_files integer 10
sessions integer 445
shared_server_sessions integer

Note: sessions is a derived value, determined by the value of processes, the formula sessions=1.1*process + 5

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326797380&siteId=291194637