LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   What kernel to use with P4 HT based system? (https://www.linuxquestions.org/questions/linux-hardware-18/what-kernel-to-use-with-p4-ht-based-system-207332/)

Splin 07-20-2004 05:29 AM

What kernel to use with P4 HT based system?
 
Hey there, I got pretty nooby question. I got P4 Hyper-Threading based system and I've been long wondering what kernel I should use. Mdk 10 comes with smp, standard and enterprise kernels. Smp sounds as a good deal but I am still uncertain.
Also I am trying to figure out how to compile the right kernel for my sys from sources. Any guidelines or settings what I should keep in mind for P4 & HT?
Thank you

Andrew Benton 07-20-2004 09:36 AM

On the processor type and features menu you should choose pentium 4 as the processor family and you should enable symmetric multi-processing support. Not that it makes much difference. Hyperthreading is all hype if you ask me.

SpeedFreak03 07-20-2004 02:26 PM

Yea run the SMP kernel. I actually for once have proof (well, proof enough for me, I don't have any numbers) that having HT enabled actually did something:

When I first installed Fedora (Core 1), it had kernel 2.4.22-1.2115.nptlsmp. Then I ran "apt-get upgrade" and one of the things was kernel 2.4.22-1.2197. So I rebooted and it ran this, but no SMP! I wasn't aware of this but I noticed everything compilied slow(er) (its still sickening fast lol). Then later on I was reading about Hyperthreading in Linux, and i ran "cat /proc/cpuinfo" and only one of the CPU"s" was shown! Normally it would look like this:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.60GHz
stepping : 9
cpu MHz : 2605.956
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
runqueue : 0

bogomips : 5203.55

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.60GHz
stepping : 9
cpu MHz : 2605.956
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
runqueue : 0

bogomips : 5203.55

but it only had this:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.60GHz
stepping : 9
cpu MHz : 2605.956
cache size : 512 KB
physical id : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
runqueue : 0

bogomips : 5203.55

So that's how you know if your hyperthreading is being used. Anyway, after configuring GRUB to use the SMP kernel (it had it in the config, so i just made it default), I compilied a few more little things (and I had to recompile two programs because of the SMP kernel), it was MUCH faster, I'd say a 1/3rd less time.

Now about compiling for hyperthreading, I've done it on my 2.4.22-2197nptl only, so I don't know how MDK10's kernel works. Anyway, for me, I go into "Processor Type and Features" then the first thing you will see is "(Pentium-Pro/Celeron/Pentium-II) Processor Family". You will see options set up like this a lot throughout the kernel setup, the (Pentium-Pro/Celeron/Pentium-II) part is the option, and when you press enter and change it to Pentium-4, it will say "(Pentium-4) Processor Family".

Next, scroll down until you see "Symmetric multi-processing support". You will want to be sure there is an asterick (*) in that box, hit "y" to be sure. Now something will pop up right under the "Symmetric multi-processing support" option that says "(2 siblings) Hyperthreading Support". As long as this says (2 siblings) and not (off) then your Hyperthreading will be enabled and working properly.

I have a few words of advice for kernel compiling in general. First, try recompiling the kernel you are currently running before you upgrade to a newer one. This is because when you upgrade to a newer one (like 2.6.7), you will have to recompile a bunch of programs most likely, and other headaches, ON TOP of making sure your custom kernel works. So as root, go to /usr/src/linux and run "make menuconfig" and have at it. When you're all done tweaking, I run "make bzImage && make modules modules_install && make install" (yes one line). Now I don't know much about Mandrake, so take all this with a grain of salt (as far as that command i just told you, the CPU stuff in the kernel should be the same), but this is how it is for Fedora Core 1 with Kernel 2.4.22-1.2197.nptlsmp.

Now when you go in there, you are gonna want to tweak everything exactly to your system, but for somebody who's new at it (Im starting to get good at it lol) this isn't a good idea - you have no many ideas how many hours I've wasted by spending half an hour tweaking all the options, then another 20 minutes to compile, then restart, and have a kernel panic or other bad message that ruins my efforts. So now, I usually tweak a few things at a time, recompile, then reboot. One more thing - since we both have P4s, our systems are pretty fast so this should be true for you too: removing all unneeded stuff really doesn't make it all that faster except when booting up, from my experience. One time I was lucky enough to get a fully custom kernel to boot and work, but it really wasnt any faster, but it did boot up faster.

Well there's my $0.02, and some advice in between. So good luck!

Splin 07-20-2004 02:39 PM

Thanks guys for the info and tips, SpeedFreak03 your little guide is much appreciated ;)
I guess another chance is to use more *lightweight* distro like debian or slack for those who are after pure speed and not whistles and bells.


All times are GMT -5. The time now is 01:18 AM.