Skip to Main Content
  • Questions
  • Processes Parameter - What does this do and how do you know if it is to high

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Craig.

Asked: August 01, 2005 - 11:13 am UTC

Last updated: August 20, 2005 - 8:19 pm UTC

Version: 9.2.0.5

Viewed 1000+ times

You Asked

I have some high waits for log file sync, one of the suggestions is to reduce the processes parameter.

What does this parameter do and how can I tell if it is set correctly

Cheers

and Tom said...

well, that would be a brutally efficient way perhaps :) It would/could prevent people from logging in and if they cannot log in, they will definitely not contribute to log file sync!

processes controls the number of Oracle processes that will be spawned (or threads on platforms that do that). Each of the backgrounds (lgwr, dbwr, ckpt and so on) are a process and if you are using dedicated server, each user connection is a process. Under shared server, the s00N processes are the process (each connection will not get a process).

Reducing processes would simply limit the number of processes Oracle can start, possibly causing connections to fail due to "processes exceeded"

I see no correlation between processes and log file sync.

Log file sync waits happen when you call commit. It is the wait that you experience whilst lgwr flushes the redo log buffer to disk. The ways to reduce log file sync waits:

a) ensure you are not "over committing", that is, commit WHEN and ONLY WHEN your transaction is done. If you are a batch process loading rows, do NOT commit each one!!! You'll wait for log file sync at each commit. Commit logical units of work, not statements!!

b) make your redo devices faster. Remove contention (dedicate disk to them). Make sure they are not on slow devices. If you are using raid-5 for them, rethink that.



Rating

  (4 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thanks Very Much

Craig Richards, August 01, 2005 - 11:45 am UTC

We run third party app on top of the database, there are many commits due to the way the application works. Maybe I can talk to them as to how this works

Thanks in advance

Rahul

Rahul C, August 20, 2005 - 12:03 am UTC

Hi Tom,


It was very usefull, But can you explain me about Initialization Parameter Processes, i'm getting error "max processes exceeded" and i kill many sessions now only some 25 to 28 sessions are opened then to the error is same. it's our stag db

the same problem was giving in our dev db (developement db) and i increased the processes parameter upto 600 and it is working fine. but i thing it's not a solution.

select s.username,s.osuser,s.sid,s.serial#,p.spid
from v$session s,v$process p
where s.paddr = p.addr
and s.username is not null;

by above query i show there were many session open and tried to kill all those session which are not in use or invalid session. but the error is same please can you help me out in these case....

Regards
Rahul Chaudhari

Tom Kyte
August 20, 2005 - 5:05 pm UTC

when you kill a session, it waits (and holds a process) until the client does something so it can say "I'm sorry, you've been killed" and exit gracefully rather than returning an ora-3113 (causing calls to support desks)


killing a session won't necessarily end the process.

processes parameter and log file sync

Jonathan Lewis, August 20, 2005 - 5:49 pm UTC

Tom,

The connection between processes and log file sync is something that Anjo Kolk told me about some time ago. I forget exact versions, but I think in 8i the log writer checks the entire x$ array at the end of a log write to see which sessions have had their log sync request honoured. But in 9i the array is only checked up to its high-water mark. I think we decided that only current processes were checked in the 10g implementation.

So there really could be a problem for a very large setting of processes - and in 9i I think there still is a problem if you intermittently use a lot of processes.

I've got some notes about it somewhere, but can't find them at present, so I have to leave some of the details a little hazy.

Tom Kyte
August 20, 2005 - 8:16 pm UTC

Jonathan -- thanks, appreciate the followup.

In short,

8i - could be a problem if processes was set much higher than needed as lgwr would iterate through the entire array

9i - could be a problem IF you used lots of processes once (raised the HWM of the array once) - but then again, you needed that many processes at some point so lowering processes would lead to other serious issues at some point.

10g - probably not an issue anymore.

What if you kill the unix server process itself?

Arup Nanda, August 20, 2005 - 7:59 pm UTC

Tom,

In response to your reply to one of the reviews - wouldn't the process be gone if we kill the server process from the unix (or whatever, the OS is)?

Thanks.

Arup

Tom Kyte
August 20, 2005 - 8:19 pm UTC

Yes it would.

Not my favored method, hence I do not suggest it.

(seems this server needs to have processes set higher to support more sessions, not kill peoples sessions because you are getting too close to processes)