Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Excessive cpu usage of low priority processes in OSF/1
@ 1994-02-16 22:21 Werner Keil
  1994-03-09 17:33 ` dickow
  0 siblings, 1 reply; 2+ messages in thread
From: Werner Keil @ 1994-02-16 22:21 UTC (permalink / raw)


Hi everyone,
            we are having problems with the cpu usage of low priority processes
on our Alphas and I was wondering if anybody else has observed this kind of behavior,
or, even better, knows a fix. Here is the problem in a nutshell:

Platforms: AXP 3000/400, OSF/1 V1.3 rev. 111; Decstation 5000/240, Ultrix 4.3.
Run two cpu-intensive, low I/O, processes, one at high (0) and one at lowest (20)
priority. On Ultrix, the low prio process will consume less than 1% (0.5% on average),
but on OSF/1 it will consistently get 20% and more! Here is a sample ps listing:

USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
marcello 13072 77.0  1.3 3.71M 808K ??  R    00:01:45 673:31.26 lh2batch
gingras  29052 22.0  0.3 2.29M 192K ??  R N    Feb 02 5189:36.46 R8.out

where lh2batch is running at priority 0, and R8.out at 20. 

Now, I know that cpu usage fluctuates and even a lowest-priority process will not
necessarily sleep or get swapped and get some cpu time (provided the system is not
too busy), but 20% (vs. 0.5% on a Decstation)?!

/usr/ucb/nice and /usr/sbin/renice (which are supposed to work in V1.3) don't
make a difference. I also did some continuous monitoring with top (Ultrix)
and syd (OSF), and the results confirm ps, so it's not just a temporary
fluctuation (provided ps and syd can be trusted). Our jobs, by the way, are
straightforward, cpu-hungry Monte Carlos with hardly any I/O; on the off-chance
that there might be something funny in the code I also tested a simple
looping csh script (while(1) ...). Result: 0 - 0.5% cpu use on Ultrix, 20 - 25%
on OSF/1!

So, what gives? Is nice/renice still broken in V1.3? Is scheduling in OSF so
different from BSD that this is actually correct behavior (hard to believe)?
Is it just some kernel parameters that need adjusting?  

Any hints would be greatly appreciated (including RTFM, as long as you tell me
which FM).

Thanks,

Werner


--------------------------------------------------------------------------

Werner Keil
Systems Manager
TRIUMF/University of BC
Vancouver, BC

wkeil@reg.triumf.ca
wkeil@ubcd05.physics.ubc.ca



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Excessive cpu usage of low priority processes in OSF/1
  1994-02-16 22:21 Excessive cpu usage of low priority processes in OSF/1 Werner Keil
@ 1994-03-09 17:33 ` dickow
  0 siblings, 0 replies; 2+ messages in thread
From: dickow @ 1994-03-09 17:33 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]

In article <wkeil.761437283@sevior>, wkeil@sevior.triumf.ca (Werner Keil) writes:
>             we are having problems with the cpu usage of low priority processes
> on our Alphas and I was wondering if anybody else has observed this kind of behavior,
> or, even better, knows a fix. Here is the problem in a nutshell:
> 
> Platforms: AXP 3000/400, OSF/1 V1.3 rev. 111; Decstation 5000/240, Ultrix 4.3.
>   (...)
>   On Ultrix, the low prio process will consume less than 1% (0.5% on average),
> but on OSF/1 it will consistently get 20% and more! Here is a sample ps listing:

We have the same problem here, with almost the same AXP configuration:
AXP 3000/400, OSF/1 V1.3A rev. 112. Our system manager reported it to
Digital about a month ago, I think, but I haven't heard about any answer yet.

The problem is unambiguously seen with this 1-line C program loop.c:
    main() { for(;;); }
started twice: at normal priority and at a very low one, using /usr/bin/nice
(not tcsh's built-in nice) and/or /usr/sbin/renice, and checking status with
ps (and top):

%CPU STAT  NI PRI UPR PPR PAGEIN INBLK OUBLK      TIME COMMAND
26.0 R N   19  63  63   0      0     0     3   0:19.65 loop
72.0 R      0  59  44   4      0     0     0   0:54.83 loop
 0.0 R      0  44  44  19      0     0     1   0:00.09 ps -o pcpu,state,nice,pr

> So, what gives? Is nice/renice still broken in V1.3? Is scheduling in OSF so
> different from BSD that this is actually correct behavior (hard to believe)?
> Is it just some kernel parameters that need adjusting?  
> 
> Any hints would be greatly appreciated (including RTFM, as long as you tell me
> which FM).

The nice/renice binary programs do not seem broken in themselves, since they
correctly alter the priority value / niceness of the process.
The _scheduling in OSF_ is a good guess at the problem.
Hopefully some kernel parameters can adjust this scheduling permanently.

The manual pages for sched_getscheduler(3) & sched_setscheduler(3) may give some
hints. They mention three different scheduling policies:
  +  SCHED_FIFO - specifies the first-in, first-out (FIFO) scheduling policy
  +  SCHED_RR - specifies the round-robin scheduling policy
  +  SCHED_OTHER - specifies the standard timesharing scheduling policy
where user processes apparently use the latter, so that
  "the scheduler adjusts process priorities. Recalculation of process
   priorities results in preemption."
I tried to test sched_getscheduler(3) today, but the linker couldn't find
it. A search with nm(1) of /lib/lib*.a and /usr/lib/lib*.a was unsuccesful.
(Only the superuser can call sched_setscheduler).

> Werner Keil
> Systems Manager
> TRIUMF/University of BC
> Vancouver, BC

*****************************************************************************
*   Ulrik Dickow			Internet: Ulrik.Dickow@nbi.dk  or   *
*   Niels Bohr Institutet	                  Ulrik.Dickow@cern.ch	    *
*   Blegdamsvej 17		    	DECnet:   NBIVAX::DICKOW	    *
*   DK-2100 K�benhavn �				    		            *
*   Denmark                             Phone:    +45 353 25 329            *
*****************************************************************************


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-03-09 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-02-16 22:21 Excessive cpu usage of low priority processes in OSF/1 Werner Keil
1994-03-09 17:33 ` dickow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox