Solved

CPU HOGS

Posted on 1997-06-26
18
500 Views
Last Modified: 2013-12-27
I use a Windoze application (DRAFIX CAD v3.00) that hogs all "available" CPU cycles.  This makes things in the background run somewhat slowly, but that's OK, when the app is in the foreground.  However, it continues to eat all available cycles even when I remove the focus from it, and even when I minimize it!  I have DOS_BACKGROUND_EXECUTION and WIN_DDE both set OFF.  Why does this thing continue to run in the background? (Very annoying).

A related question:  When I print a much of anything to my Laserjet 4, the system is very unresponsive while spooling.  The Queue Priority is set all the way to the left (as low as possible).  Is there any way to give PMPRINT even less priority?

Related Info:  

System is a P-133 (on a Tyan Tomcat III), 48M
Matrox Mystque, 4M.
Warp 4.0, no fixpacks.
CPU Load being monitored with the MEMSIZE/System Resources utility, *not* Pulse.
0
Comment
Question by:uwe
  • 5
  • 3
  • 2
  • +8
18 Comments
 

Author Comment

by:uwe
ID: 1805981
Edited text of question
0
 

Expert Comment

by:lior
ID: 1805982
Both Questions probably need you to play with IDLE-SENSITIVITY and IDLE-TIME in the SETTINGS of the program.  You might want to see if you change the settings of WIN-OS2 FULL SCREEN and then run the program from within WIN-OS2 F.S. will it still hog the CPU.  Also play with the SESSION-PRIORITY setting.  For the printer, you might want to check PRINTER-TIMEOUT setting.


I hope this helps
0
 

Author Comment

by:uwe
ID: 1805983
IDLE_SECONDS is set to 0, and IDLE_SENSITIVITY is set to 1.  I've tried other values for these, and none make any difference.  SESSION_PRIORITY is set as low as it can be (1) (which corresponds to a system priority of REGULAR 0).  Increasing SESSION_PRIORITY makes everything else (which runs at REGULAR 0) really unresponsive whenever I run DRAFIX.

I just tried the full-screen thing.  No change.  Yes, it still hogs the CPU.  

The printer question is not related to Drafix CAD. The source of the print job doesn't matter. My understanding of  PRINT_TIMEOUT is that it determines the length of time that the OS waits before committing a job to the queue after receiving the last character (for apps that don't make an "I'm done sending this print job" system call).  The system only becomes unresponsive once PMPRINT starts to spool the job to the printer.
0
 

Expert Comment

by:jdunlop
ID: 1805984
I can't address your Windows problem, since it
seems clear you're dealing with a !@#% pig.

However, you appear to have your printing
terminology confused. Spooling is the act of
storing a print job to disk. Despooling is the
act of sending the print job to the printer. If
you have utilization problems despooling, you
probably need to put /IRQ on your print01.sys
command line in config.sys.
0
 
LVL 13

Expert Comment

by:magarity
ID: 1805985
well, i dont know how to stop your win
program from attempting
to slam your cpu, but to minimize the
effects you can try this in config.sys:

set maxwait=1  (instead of the default 3)
set priority=absolute
set priority_disk_io=yes

these settings have the net effect of
making the cpu load as flat as possible
for all active programs when there is a
runaway cpu hog loaded.  the win program
may still try to hog the cpu, but it will
not be allowed as much time so it will
seem to you as the user that it has been
slowed down.  a bit of a kludge, i admit,
but you can at least do it as an interim
fix til you find a better solution.
0
 
LVL 2

Expert Comment

by:sprinkmeier
ID: 1805986
Not an answer, but maybe a way to narrow down the problem:
Try setting the print spooler to HOLD (right-click on printer icon, changeStatus->hold). Now print from the M$ app. If it's still slow, it's M$ holding you up, if it's fast, it's the spooler.
0
 

Expert Comment

by:dr_gonzo
ID: 1805987
Jeez, sounds like your config.sys is messed up
quite much! Try running Confgi optimizer, you
can get it from:
ftp.cdrom.com
in the os2/hobber archive and from other places!
0
 

Expert Comment

by:sneakers
ID: 1805988
Does the problem occur if you hold the
printer until after you complete using the
Windows program?  I'm wondering the
problem is not with Windows put your
printing subsystem.

I have a similar problem on my Pent 200Mhz
but I don't have any Windows applications
(all OS/2 native here).  When I print (HP
550C) my CPU goes to 100%.  Basically, I
keep the printer on hold until I want to
print (and don't have any CPU bound
programs running).
0
 
LVL 1

Expert Comment

by:timur
ID: 1805989
If you have printing performance problems, it's because you
didn't add the /IRQ switch to the DEVICE=PRINT01.SYS line
in your config.sys.  Note that not all printers/cables are
compatible with IRQ-based printing, so you might not have
much of a choice.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Expert Comment

by:magic_wizard
ID: 1805990
Hmm.
Certain programs just can not run properly
under OS2/Warp (or rather they do on the
cost of other things like your cpu-hog)

Printer-Porblem!
No printer problem, No software-problem.
Your printer probably doesn't have enough
memory to keep everything local when
actually printing out on the paper.
There are quite a lot of lazer-printers
out there that brings your computer to a
halt when printing. That is due to little
memory in the printer.
The printer-software demands total control
when actually de-spooling because if there
is an interuption in the data being sendt
to the printer it would mess up the page
being printed.
The Que priority lever will not help this
problem at all.(I think this only really
works as intended on a ink-jet or matrix
printer.)
More memory on the printer is the only
solution I can think of here.....
Still good luck with the other cave-eats.
A stupid thing is that I havn't got that
program myself, so if I really did come up
with something, it would only be guesses.

Morten Brendefur
brendefu@online.no
0
 

Author Comment

by:uwe
ID: 1805991
Nope, my LaserJet 4 has 6 megs of memory, enough for a full page at 600dpi, and I run with page protection ON.  
0
 

Expert Comment

by:sneakers
ID: 1805992
I'm still wondering if holding the printer and the 100%.  Maybe
I missed the answer.  If you run the Windows program and have
the OS/2 Printer held, does the CPU go to 100% or stay "normal."

Basically, does the CPU only go to 100% while printing or does
it go 100% at spooling time?
0
 

Author Comment

by:uwe
ID: 1805993
The two problems are unrelated.  CPU utilization goes to 100% anytime the Windoze program (Drafix CAD) is loaded, even when it's minimized and doing nothing.  

As far as the printing problem, I just got to fooling with it again some more today.  It's worst when spooling to the queue, not when despooling from it, and does seem to be somewhat dependent on the application, with Netscape being the worst offender.
0
 

Expert Comment

by:magic_wizard
ID: 1805994
When it comes to your drawfix.....
Have you tried setting the IDLE SECONDS to say 5
and the IDLE SENSITIVITY to lower than 100? (maybe try 25 or
even 1 just for the sake of testing.)
What about starting a windows fullscreen session and then start
the drawfix program from windows again. (Not directly from OS2)
(Make sure you do not have the hog when Windows is started, and
then check wether the hog is there after drawfix has started.
If the hog then pops up, then I suppose the people who wrote
drawfix know enough about OS2 to set it up that way.)

About the printer.
Hmmmmmmm.. Memory enough !!!! I got no solution at this stage.
Morten Brendefur
brendefur@online.no
0
 

Author Comment

by:uwe
ID: 1805995
Yep, did that.  Reduced Idle Seconds and Idle Sensitivity to minimum.  Tried running it from full-screen WIN-OS2.  No hog until Drafix loaded.  Don't think the authors know anything about OS/2, i.e. I don't think it's intentional.  I think the problem may stem from the fact that Drafix tries to "act" in some ways like a multi-threaded program (background redraws, etc).  

Anyone know of a way to knock the Priority of a Windoze program down to IDLE Class?

 
0
 

Expert Comment

by:magic_wizard
ID: 1805996
Sorry. I got no further hints on this
case. Seems like you'll just have to live

with it.
First time I have encountered this sort of

problem.
If you manage to ask the OS2/Crew at IBM

they just might have a patch-file for this

problem with that program. NO PROMISE

THOUGH.
0
 

Expert Comment

by:vk5ztv
ID: 1805997
Stardock Systems' Process Commander will allow you to set a specific application priority to IDLE or any other valid setting. I'm not sure whether or not it will work with a Win-OS/2 program though - you'd actually have to set the priority of the VDM that Drafix is running it. You could try PC and see if it works...

Incidentally, what mode is that Win-OS/2 session running in - standard or enhanced mode? Try the opposite mode to what its using and see if it works (bearing in mind that some Windoze apps won't run in standard mode).
0
 
LVL 1

Accepted Solution

by:
sbufton earned 100 total points
ID: 1805998
Regarding your DRAFIX problem: I'm not sure that there is a solution. Microsoft Access behaves much the same way, and I have not yet managed to make it do anything else. OS/2's idle detection seems to be based on when a DOS app is examining the keyboard or a Windows app is waiting for messages to be sent to it (probably with the WinGetMessage call); I suspect that what Access (and DRAFIX) do is keep a tight loop using WinPeekMessage to check whether there are messages to get, and if not, they go and do something else. I doubt that there is a solution.
I have noticed, though, that if you wait for several minutes, the system load with Access does drop - although this may be Access specific. (Access behaves the same way on NT, by the way - when it is loaded, the CPU load is at 100%).

Regarding your print spooling problem: if the high system load occurs while the data is being sent to the spooler, then it is probably a problem with the driver. Which version are you using? The current version is 30.514, I think. It will also depend very much on the application, which seems to be true from your description - some apps are either less efficient in their print generation, or have more work to do. If a newer driver does not help, you may again just have to live with it.

One more thing worth trying: what happens if you set the printer to output to a file instead of to the printer? Does that make any difference? And what if you disable the spooler altogether, so that the output is sent directly to the file?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AS400 application emulation 7 48
System Restore 5 48
Ubuntu 16.04 Emergency Boot 2 150
Time Machine reports 'Disc Full' 3 43
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now