Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Background Processes and I/O

59 views
Skip to first unread message

Michael J. Moore

unread,
Dec 20, 2003, 8:22:45 PM12/20/03
to
From 9i Self Test ...

Which 4 background processes perform I/O? (Choose 4)

* DBWn
* ARCn
* PMON
* SMON
* CKPT
* LGWR
-----------------
I thought they all did, except CKPT which tells DBWn to do it, and PMON
which only works with memory structures.

Their answer was all except SMON and PMON. In reality, none of them do I/O
because they call OS library routines to do the actual I/O. This is why I
don't have a chance in hell of passing this test, because too many answers
depend on how you consider the question. ;-)

Any comments?


Ana C. Dent

unread,
Dec 20, 2003, 8:32:41 PM12/20/03
to

I agree with "their" answer.
Which process writes to the control files?

Michael J. Moore

unread,
Dec 20, 2003, 10:15:05 PM12/20/03
to
Okay, but why would CKPT be any more true than SMON? Does not SMON also
perform I/O?


"Ana C. Dent" <anac...@hotmail.com> wrote in message
news:ZK6Fb.32237$BQ5.9627@fed1read03...

Ana C. Dent

unread,
Dec 20, 2003, 10:30:12 PM12/20/03
to


Top posting is rude!

DBW - does I/O to datafiles
ARC - Does I/O when archiving redo logfiles
CKPT- Updates control files.
LGWR- Writes redo logfiles.
To which file(s) does SMON read & write?

Michael J. Moore

unread,
Dec 20, 2003, 11:06:01 PM12/20/03
to

"Ana C. Dent" <anac...@hotmail.com> wrote in message
news:8t8Fb.32649$BQ5.21787@fed1read03...

Sorry, I didn't know that top posting is rude.

SMON performs instance recovery, so it must read from redo logs. The manuals
I have read are not clear on how SMON does this, but if it does read, then
that counts as I/O, right? SMON also cleans up temporary segments anc
coalesces free extents. Can it do this without performing I/O?


Ana C. Dent

unread,
Dec 20, 2003, 11:33:55 PM12/20/03
to

SMON might to I/O at instance startup; also to the rollback segments for
uncommitted "transactions" (which I'll stipulate is an oxymoron).

I agree that the OCP test questions leave a lot to be desired.

Michael J. Moore

unread,
Dec 20, 2003, 11:44:59 PM12/20/03
to
--- snip---


> >
> > SMON performs instance recovery, so it must read from redo logs. The
manuals
> > I have read are not clear on how SMON does this, but if it does read,
then
> > that counts as I/O, right? SMON also cleans up temporary segments anc
> > coalesces free extents. Can it do this without performing I/O?
>
> SMON might to I/O at instance startup; also to the rollback segments for
> uncommitted "transactions" (which I'll stipulate is an oxymoron).
>
> I agree that the OCP test questions leave a lot to be desired.
>

Well you did straighten me out about CKPT ... thanks. It is interesting that
even in the Oracle manuals, their diagrams never show SMON pointing to any
of the files, only pointing to the SGA. This leaves me wondering if SMON
actually performs it's own I/O or invokes some other process to do it's
dirty work. I wish they would give a little more detail.

Geomancer

unread,
Dec 21, 2003, 9:07:14 AM12/21/03
to
> I thought they all did, except CKPT which tells DBWn to do it, and PMON
> which only works with memory structures.

If you are on 9i, you can measure the RAM used by the Oracle background processes:

select
program,
pga_used_mem,
pga_alloc_mem,
pga_max_mem
from
v$process;

Paul Drake

unread,
Dec 21, 2003, 12:01:00 PM12/21/03
to
"Michael J. Moore" <NOhica...@comcast.net> wrote in message news:<ez9Fb.446468$275.1320599@attbi_s53>...

normally, for a user process, a logon trigger could be used to trace
it (event 10046). I've seen text indicating that an instance crash is
likely if you trace PMON, but I don't know if that is true for SMON.
So lets just leave that at the usual "don't run it against a database
that you can't destroy/corrupt". Then again, the trace file might be
so cryptic that only an x$_% wizard (fluent in elvish) could read it.

I believe that LGWR can also write to the controlfiles. I've seen a
trace file where a controlfile was locked by a backup process
(infidels!) and LGWR crashed before CKPT did. Hmmm, does PMON perform
any IO when it takes down the instance?

Pd

Jonathan Lewis

unread,
Dec 21, 2003, 1:29:59 PM12/21/03
to

Smon kicks in every 5 minutes to query ts$ to check
if any dictionary-managed tablespaces have pctincrease
non-zero, and then tries to coalesce them. THere are several
other jobs that smon does which are also visible as standard
SQL querying, and therefore require normal database read
requests.


--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

The educated person is not the person
who can answer the questions, but the
person who can question the answers -- T. Schick Jr


One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html


Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK___November


The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


"Michael J. Moore" <NOhica...@comcast.net> wrote in message
news:ez9Fb.446468$275.1320599@attbi_s53...

Jonathan Lewis

unread,
Dec 21, 2003, 1:32:25 PM12/21/03
to

If pmon is recovering a process, it has to do a
rollback on behalf of that process. Consequently
it has to read the rollback blocks in reverse order,
and the datablocks as required.

For a long-running transaction, many undo blocks and
some data blocks are likely to be on disc, so pmon will
have to re-read them in the normal fashion.

During testing, I've never seen the database crash
on a normal sql_trace=true in the init.ora, and the
resulting traces from pmon et. al. have been quite
interesting.

--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

The educated person is not the person
who can answer the questions, but the
person who can question the answers -- T. Schick Jr


One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html


Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK___November


The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


"Paul Drake" <drak...@yahoo.com> wrote in message
news:1ac7c7b3.03122...@posting.google.com...

Michael J. Moore

unread,
Dec 21, 2003, 2:09:15 PM12/21/03
to

"Jonathan Lewis" <jona...@jlcomp.demon.co.uk> wrote in message
news:bs4p1v$go8$1$8300...@news.demon.co.uk...

>
> Smon kicks in every 5 minutes to query ts$ to check
> if any dictionary-managed tablespaces have pctincrease
> non-zero, and then tries to coalesce them. THere are several
> other jobs that smon does which are also visible as standard
> SQL querying, and therefore require normal database read
> requests.
>
>
> --
> Regards
>
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
>

So, is it fair to say that both SMON and PMON perform I/O?
Regards,
Mike


Niall Litchfield

unread,
Dec 21, 2003, 4:33:26 PM12/21/03
to
I'm pretty sure, and I don't know how the question was phrased in your test,
but at 8i that the which processes do IO question seemed to regard only
writes as IO and not reads.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer
******************************************


"Michael J. Moore" <NOhica...@comcast.net> wrote in message

news:vdmFb.12034$VB2.21282@attbi_s51...

Billy Verreynne

unread,
Dec 22, 2003, 12:26:47 AM12/22/03
to

I agree that this is bs.


SQL> select sid, program from v$session;

SID PROGRAM
---------- ------------------------------------------------
1 oracle@tjs-prod (PMON)
2 oracle@tjs-prod (DBW0)
3 oracle@tjs-prod (LGWR)
4 oracle@tjs-prod (CKPT)
5 oracle@tjs-prod (SMON)
6 oracle@tjs-prod (RECO)
7 oracle@tjs-prod (ARC0)
8 oracle@tjs-prod (ARC1)
<snipped>

SQL> select * from v$sess_io where sid = 5;

SID BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES
---------- ---------- --------------- -------------- -------------
CONSISTENT_CHANGES
------------------
5 46446 148181 70781 29868
23

70,781 physical reads. This btw is the 2nd highest i/o process
currently on the prod db I pulled these stats from.


Personally I think things like OCP and MSE certifications are worth
crap. It is like those arses who think that a penis enlargement means
they will be better at sex.

--
Billy

0 new messages