vanroy@ucbvax.berkeley.edu (06/05/91)
Assembling a SPARC assembly file that is 8 Meg long takes several hours of clock time (around 40 minutes of CPU time) and needs 72 Meg of virtual space (of which only 3-6 Meg are resident at any time). The assembly runs fast at first (using >80 % of cpu cycles), but slows to a trickle ( <10% of cpu cycles) after about 20 cpu minutes, on an otherwise unloaded machine. Is it thrashing? How in the name of ?$%&! can an assembler thrash? This is running under cc on a SPARCstation 1+ with 40 Meg internal memory and 150 Meg swap space. Can anyone explain this behavior? The assembly file uses a large number of local labels (about 56 thousand), but is otherwise rather vanilla. Thanks for any pointers, Peter Van Roy vanroy@ucbarpa.berkeley.edu
jimh@uunet.uu.net (Jim Harkins) (06/28/91)
In article <3399@brchh104.bnr.ca> you write: >Assembling a SPARC assembly file that is 8 Meg long takes several hours >of clock time (around 40 minutes of CPU time) and needs 72 Meg of virtual >space (of which only 3-6 Meg are resident at any time). The assembly runs >fast at first (using >80 % of cpu cycles), but slows to a trickle ( <10% of >cpu cycles) after about 20 cpu minutes, on an otherwise unloaded machine. >Is it thrashing? How in the name of ?$%&! can an assembler thrash? This is >running under cc on a SPARCstation 1+ with 40 Meg internal memory and 150 Meg >swap space. First, why is your file 8 Meg long? How do you edit the turkey?? To answer the question, the way priorities work in UNIX is the longer a process runs the lower it's priority. As you may or may not know, when UNIX runs a process it runs it in pieces (thats why it's called multitasking). Lets say your priority was 1. The second time it gets CPU time it will have a priority of 2, the third time a priority of 4, the fourth time a priority of 16, etc. This keeps CPU intensive tasks from hogging the CPU and gives other people a chance. Obviously, after 20 minutes of CPU time your priority is somewhat less than the idle loop. jim