1 |
Brett Johnson posted <42E77E5B.4040604@××××.com>, excerpted below, on |
2 |
Wed, 27 Jul 2005 07:30:19 -0500: |
3 |
|
4 |
> netpython wrote: |
5 |
>> I have enabled SMP on my gentoo AMD64 system and my box doesn't run any |
6 |
>> slower (or faster). |
7 |
>> |
8 |
>> |
9 |
> As stated earlier by Duncan (in what I thought was a great explanation!); |
10 |
> |
11 |
> "If you are using only a single-core AMD64, you'll want SMP off, because |
12 |
> altho the kernel will work with it on, it'll be more bloated than it needs |
13 |
> to be." |
14 |
> |
15 |
> This just means the physical size of the kernel will be larger than it |
16 |
> needs to be, and consume more memory. It will have no impact on overall |
17 |
> system performance. |
18 |
|
19 |
Exactly so, because when the kernel doesn't detect a second CPU, it'll |
20 |
disable most of the SMP code and not even touch it, therefore not |
21 |
affecting performance. |
22 |
|
23 |
The only exception is the size of the kernel. Kernel memory is locked |
24 |
memory -- it cannot be swapped out. Therefore, a kernel larger than it |
25 |
has to be means less real memory available for other things, and more |
26 |
swapping and/or less caching than would otherwise be necessary. The |
27 |
effect isn't normally large enough to notice, but it /might/ mean |
28 |
occasionally waiting an extra few seconds for a swapped out app to load, |
29 |
or a file to be read from disk that otherwise would have still been in |
30 |
memory cache, were it not for that additional and entirely unused kernel |
31 |
bloat. |
32 |
|
33 |
BTW, that's also a good reason to keep drivers you don't use very often, |
34 |
likely floppy drivers, perhaps CD/DVD drivers and their filesystems, |
35 |
perhaps FAT filesystems, perhaps printers drivers and/or anything related |
36 |
such as parport drivers, perhaps scanner drivers, etc... keep them all |
37 |
compiled as modules, and only load those modules when needed, unloading |
38 |
them later. A loaded kernel module is part of the kernel, and as such, |
39 |
again, locked memory, not swappable. If you only use your floppy drive |
40 |
once a month, and only use the FAT filesystem when accessing the floppy, |
41 |
it simply makes no sense to compile it built-in to the kernel, or to keep |
42 |
those modules loaded when not in use. Far better to free that memory, so |
43 |
it may be used by something you are actually /using/. |
44 |
|
45 |
-- |
46 |
Duncan - List replies preferred. No HTML msgs. |
47 |
"Every nonfree program has a lord, a master -- |
48 |
and if you use the program, he is your master." Richard Stallman in |
49 |
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html |
50 |
|
51 |
|
52 |
-- |
53 |
gentoo-amd64@g.o mailing list |