Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
'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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.