If you, like me, happen to have more than one (or a dual-core) processor, consider yourself a priveleged and distinguished person. If those multiple CPU's, like mine, happen to be Celeron 400Mhz or less, then ignore this article and set your motherboard on fire. Seriously.
If you're still reading this because:
a) You think your CPU's are totally badass, or
b) You have 400 Mhz Celerons but want them to be useful despite my warnings,
then be my guest.
To take advantage of the Symmetric Multiprocessing features in the Linux Kernel (much improved in the 2.4 and 2.6 series), you'll have to recompile your kernel. If this scares you, don't worry, several guides exist online to help you with this. Try a search on Google. Just remember to always keep a backup kernel that you can boot into so you can mess around until you compile a working kernel.
Anyway, when you recompile the kernel, enable Symmetric Multiprocessing and the features included with it. Now once you have support for multiple CPU's up and running compiling will go a lot faster. You can check your support by typing dmesg at a terminal and reading the output, making sure it recognized all your CPU's starting with CPU#0.
One really cool thing you can do with multiple CPU's when compiling programs is run make with the arguments -jX, where X is number of CPU's + 1. For example make -j3 for a 2 CPU system. Make will run 3 processes at once, taking advantage of all the CPU's. This actually increases performance in single CPU machines too, run make -j2. Enjoy!
Wednesday, June 21, 2006
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment