On Sun, 2004-05-16 at 22:17, Bob Proulx wrote: > cwinl wrote: > > my server is dual P4 Xeon 2.8G with HT tech. > > someone told me that i should turn off HT because of bad performance. > > i'd never heard about that before. > > is it a good advice and worth to do that right now? > > What I really recommend is that you should benchmark your system and > determine that for yourself. Run first one task. Then two tasks > simultaneously. Then three and so on. Try that both with > hyperthreading on and then with it off. > > What I found is that the first two logical cpus were on the same > physical cpu. So two running tasks would be located there. Each > would run at half speed because they each get only half of a physical > cpu. The other cpu in the dual cpu system would be idle until a third > task came along at which it would run that task at full speed. > Hyperthreading was actually hurting a multi-cpu system because the > kernel task scheduler did not know about it. This was with linux 2.4 > and I do not know if 2.6 improves upon the situation. > > Bob The new 2.6.6 kernel has SMT support but it needs to be compiled in. As far as performance degradation... I think that statement has been taken out of context (a sort of urban legend). The point of this statement is that the system will not reap the full benefits of hyperthreading without an SMT aware scheduler. As far as "only getting half of the CPU", I'm not sure what that means. Only one process can run on a physical CPU at a time. Hyperthreading is nothing more than hardware based context switches. When a process encounters a cache or TLB miss, the CPU switches context to another process while it handles the memory read. It's still only working on one process at a time (well we do have an 18 stage pipeline so we're actually working on 18 instructions at once all in different phases though, i.e. fetch, decode, etc...). The issue with a strictly SMP based scheduler involves affinity and load balancing. The same affinity rules don't necessarily apply to a process running on a sibling CPU because they share certain caches. Load balancing assures that we make proper use of all CPU's (logical or physical) as evenly as possible. Generally speaking that it is... The dual Xeon is an incredible bang for the buck. I wouldn't disable hyperthreading but I would get an SMT scheduler running on that machine so you can get your moneys worth out of it. I have 2.6.6 kernel packages specifically compiled for the Dell poweredge series with SMT support. I can give you the sources.list entries if you'd like to try any (they were compiled against sarge i.e depends on module-init-tools and initrd-tools from sarge). They have RAID and SCSI support but things like USB and Firewire have been gutted. They are intended for servers. I also use the mm patchset (vanilla source). -- gaumer <gaumerel@titan.ecs.fullerton.edu>
Attachment:
signature.asc
Description: This is a digitally signed message part