LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-19-2007, 10:07 AM   #1
johnfman
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Rep: Reputation: 0
Unhappy sqlplus jobs getting no CPU time


I'm trying to run large sqlplus jobs in the background (Oracle 9.2.0.6). These jobs are mostly mass deletes from large tables, and index rebuilds. I run them with 'nohup' so they won't stop if my session stops. They are SO slow, and watching them with 'top', I see that the CPU is 90+% idle, and my background processes get very little processing time (the cumulative cpu time rises very slowly). It also seems that if I logoff (or if the VPN logs me off), the process, which is still running, drops to the bottom or near-bottom of the 'top' list. I have tried renicing to change this but to no avail.

How do I get the CPU to stop ignoring these processes? How do I get more CPU time for background jobs?

John F
 
Old 09-19-2007, 10:44 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi
I wouldn't fully rely on "top" for background processes. Sometimes in my case "top" was showing no sys/user/wait CPU activity, while nmon showed completely different figures. So, try first to download nmon or use "vmstat" and see what they say.
Otherwise how does the disk usage look like? And (perhaps a stupid question) what about the runtime of your jobs? How much "SO" slow are they? Isn't it that you're just running too many jobs, too many for the disks to keep up? On which kind of disk system do the Oracle datafiles reside and how large are the tables that you are modifying/rebuilding?
 
Old 09-19-2007, 12:11 PM   #3
johnfman
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
'vmstat' shows the same conditions. And, the box is not bogged down, the application isnt running. I dont know how the disk is performing: this version of 'top' doesnt' have an 'i/o wait' display, and there's no 'iostat' on this machine (or its not in the root user's path). How else can I get disk wait time?

jaf
 
Old 09-19-2007, 09:13 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Once you've invoked sqlplus to run the script, the actual processing is being done by the rdbms engine procs PMON, SMON, DBWR, LGWR, CKPT (iirc).
The client sqlplus proc uses very little cpu, most of the time.
 
Old 09-20-2007, 05:04 AM   #5
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
nmon shows disk activity. Here are some of the keys:
"c": cpu
"m": memory
"d": disks
"t": top processes
...
 
Old 09-20-2007, 09:35 AM   #6
johnfman
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
I downloaded nmon and used it. CPU idle time is high, and oracle
processes needing CPU are getting very little. And by the way, it is the actual connection process, a child of the sqlplus process, that accumulates the CPU time.

So an import job ran all night, and by this morning had accululated 4 minutes of CPU time on a mostly idle machine! What controls this? How can I change it? Is is the scheduler? One article I've read recommends a different scheduler for database operations. Help! I haven't got time to wait for the OS to dole out CPU cycles at its leisure.

I note that foreground processes seem to get more CPU, regardless of nice value.

jaf
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kacpid eating cpu 99% cpu time! tjclancy Linux - Software 13 09-19-2011 03:08 PM
part time jobs on internet gagana Linux - General 2 09-12-2006 11:16 AM
Cron jobs not executed at right time(persistent UTC?) baddah Linux - Newbie 2 03-29-2006 11:27 PM
My client print jobs time out blackdragonblood Linux - Networking 1 01-12-2006 11:43 AM
awake jobs at specified time merlin23 Linux - Newbie 5 12-02-2004 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration