|
本帖最后由 Yong Huang 于 2013-7-8 15:17 编辑
In threaded execution mode (see msg #14 to enable), the number of Oracle processes is drastically reduced:
[oracle@dcdrpcora1a admin]$ ps -fu oracle
UID PID PPID C STIME TTY TIME CMD
...[a few bash shell processes]...
oracle 12630 1 0 15:45 ? 00:00:00 /u01/app/oracle/product/12.1.0/db/bin/tnslsnr LISTENER -inherit
oracle 15457 1 0 15:47 ? 00:00:00 ora_pmon_test12c
oracle 15459 1 0 15:47 ? 00:00:00 ora_psp0_test12c
oracle 15461 1 0 15:47 ? 00:00:00 ora_vktm_test12c
oracle 15465 1 0 15:47 ? 00:00:03 ora_u004_test12c
oracle 15472 1 5 15:47 ? 00:00:26 ora_u005_test12c
oracle 15478 1 0 15:47 ? 00:00:00 ora_dbw0_test12c
All except the two ora_u* processes are just like in process (non-threaded) execution. The two ora_u* processes each contain multiple threads:
$ ps -fLp 15472
UID PID PPID LWP C NLWP STIME TTY TIME CMD
oracle 15472 1 15472 0 40 15:47 ? 00:00:00 ora_u005_test12c
oracle 15472 1 15473 0 40 15:47 ? 00:00:00 ora_u005_test12c
...
Each thread has a specific function:
SQL> select stid, pname, program from v$process where spid = 15472 order by 1;
STID PNAME PROGRAM
----- ----- ---------------------------------------------
15472 SCMN oracle@dcdrpcora1a (SCMN)
15474 DIAG oracle@dcdrpcora1a (DIAG)
15476 DIA0 oracle@dcdrpcora1a (DIA0)
15484 RECO oracle@dcdrpcora1a (RECO)
15486 MMON oracle@dcdrpcora1a (MMON)
15487 MMNL oracle@dcdrpcora1a (MMNL)
...
15712 Q002 oracle@dcdrpcora1a (Q002)
15713 Q003 oracle@dcdrpcora1a (Q003)
21258 oracle@dcdrpcora1a <-- server thread for my sqlplus connection, no PNAME
29468 W001 oracle@dcdrpcora1a (W001)
SQL> select stid, pname, program from v$process where spid = 15465 order by 1;
STID PNAME PROGRAM
----- ----- ---------------------------------------------
15465 SCMN oracle@dcdrpcora1a (SCMN)
15468 GEN0 oracle@dcdrpcora1a (GEN0)
15469 MMAN oracle@dcdrpcora1a (MMAN)
15475 DBRM oracle@dcdrpcora1a (DBRM)
15479 LGWR oracle@dcdrpcora1a (LGWR)
15480 CKPT oracle@dcdrpcora1a (CKPT)
15481 LG00 oracle@dcdrpcora1a (LG00)
15482 LG01 oracle@dcdrpcora1a (LG01)
15483 SMON oracle@dcdrpcora1a (SMON)
15485 LREG oracle@dcdrpcora1a (LREG)
As you can see, the latter one is very critical, as it contains LGWR, CKPT, etc. On Linux/UNIX, you can check a background process environment variable SKGP_HIDDEN_ARGS to see if it's fatal or non-fatal (previously just called background).
$ ps eww 15465
PID TTY STAT TIME COMMAND
15465 ? Ssl 0:03 ora_u004_test12c... SKGP_HIDDEN_ARGS=<FATAL/...
$ ps eww 15472
...SKGP_HIDDEN_ARGS=<NF/...
If it's fatal, killing the process would crash the instance. It's a quick way to find out whether you can release memory by killing a process. (Of course the real solution is elsewhere, fixing a bug for memory leak, e.g.)
|
|