Messages in this thread | | | Date | Tue, 11 May 1999 17:51:42 +0100 (GMT) | From | Riley Williams <> | Subject | Re: Linux can't stay up for more than an hour? |
| |
Hi again.
>> distinctly faster under the UP kernel than the SMP one with the >> following command:
>> Q> make -j bzImage
> If you go in swap I trust.
No swap was used - apart from anything else, the machine in question didn't have any swap set up to use. What it DOES have is 1G of RAM to play with, which is all that the standard Linux kernel can make use of without code tweaking anyway...
> The point is that -j make no limit in the number of gcc child > launched at once. This mean that you may easily go out of > memory, and when you start swapping and shrinking memory you are > going to be very single threaded even if the application runs > mostly userspace code...
What you've overlooked is that make has an inbuilt limit, in that it won't start child processes for more than one directory at a time. Here's a count of the number of *.c files in each directory containing more than 50 of them in kernel 2.2.7 (which I have to hand):
Q> 67 /usr/src/linux-2.2.7/drivers/sound Q> 69 /usr/src/linux-2.2.7/drivers/video Q> 74 /usr/src/linux-2.2.7/drivers/char Q> 103 /usr/src/linux-2.2.7/drivers/scsi Q> 124 /usr/src/linux-2.2.7/drivers/net
As you can see, your -j80 would've been the equivalent of -j on all except the last two, and the -j that I used was the same as -j124 in this case...probably lower as 2.2.7 wasnae out when I was playing with that box - I believe 2.2.5 was current at the time...
Incidentally, the above count was produced with the following script:
Q> #!/bin/bash Q> function fetch() { Q> for DIR in `find $1 -type d` ; do Q> COUNT=`ls -1 $DIR/*.c | wc -l` Q> printf '%5u %s\n' $COUNT $DIR Q> done Q> } Q> fetch /usr/src/linux-2.2.7 | sort -n
You can now verify the results on other kernel trees...
> Try with a more moderate load `make -j20' for example. Compare > it with a plain make and you'll see ;). There's to say that > `make -j20' should be faster also on UP compared with a plain > `make', because you will take the CPU always busy even when you > wait for I/O completation (so good thing! ;).
I don't have access to the system in question now, so can't do any more tests on it...
>> Please advise how that compares with your sample?
> Run `make -j20' on a SMP machine with pre-2.2.8-4 UP kernel. > Then run the same on the same SMP machine but this time with > pre-2.2.8-4 SMP kernel. Compare the times (really I never tried > on the same machine... so it's interesting ;).
As stated above, I no longer have access to the box in question, so can't do so...
Best wishes from Riley.
+----------------------------------------------------------------------+ | There is something frustrating about the quality and speed of Linux | | development, ie., the quality is too high and the speed is too high, | | in other words, I can implement this XXXX feature, but I bet someone | | else has already done so and is just about to release their patch. | +----------------------------------------------------------------------+ * ftp://ftp.MemAlpha.cx/pub/rhw/Linux * http://www.MemAlpha.cx/kernel.versions.html
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |