From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,632cb0efa9bd2e4b X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-09 09:33:57 PST Path: gmd.de!xlink.net!howland.reston.ans.net!EU.net!dkuug!uts!nbivax.nbi.dk!dickow From: dickow@nbivax.nbi.dk Newsgroups: comp.unix.osf.osf1 Subject: Re: Excessive cpu usage of low priority processes in OSF/1 Message-ID: <1994Mar9.183357.1547@nbivax.nbi.dk> Date: 9 Mar 94 18:33:57 +0100 References: Summary: Same problem here. Reported to DEC. Keywords: V1.3, nice, priority, scheduling policy, timesharingDIR/, round-robin Organization: Niels Bohr Institute and Nordita, Copenhagen In article , 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 * *****************************************************************************