Database Reference
In-Depth Information
18 22118_22135 22118 22135 THREAD SMON
20 22118_22140 22118 22140 THREAD LREG
21 22118_22141 22118 22141 THREAD RBAL
15 22118_22132 22118 22132 THREAD CKPT
12 rows selected.
The output of the above command has to be interpreted depending on the execution type. For a “PROCESS”
nothing changes from the way previous Oracle releases handled processes on UNIX. If an entry in v$process has an
execution type of “THREAD” then the output has to be read as follows:
The column SPID still references the process on the operating system level with the exception
that such a process can and will have multiple sub-processes
STID is the thread number as shown in the output of ps -eLf, column LWP
SOSID is simply the concatenation of the OSPID with the STID
Thankfully Oracle still provides us with the process name in the view as well. The use of the threaded execution
model reduces the overhead of process attaching to the SGA. In a very simple example the same database is started
with threaded_execution set to false, and then with the parameter set to true. Without any user connecting, the IPC
statistics after the startup command completed showed the following:
[oracle@server1 ~]$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x74464570 1451851778 oracle 640 35651584 50
0x00000000 1451884547 oracle 640 3204448256 25
[oracle@server1 ~]$
The number of attached processes to the shared memory segments (=SGA) was 105. Restarting the database with
the threaded model enabled shows a different picture.
[oracle@server1 ~]$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x74464570 1221394434 oracle 640 35651584 14
0x00000000 1221427203 oracle 640 3204448256 7
The number of attached processes is down to 21. This can have a positive effect on consolidated environments. In
addition to the benefits of using threads such as simplified memory management and faster context switching there
has been significant work on the Linux kernel scheduler to allow scalability to hundreds of thousands of threads since
NPTL became mainstream.
 
Search WWH ::




Custom Search