[CentOS] Kernel ELsmp vs EL
J.J. Garcia
stigmatedbrain at gmail.com
Fri Sep 8 06:48:46 UTC 2006
El vie, 08-09-2006 a las 10:59 +0800, John Summerfield escribió:
> Jim Perrin wrote:
> >>
> >> Awesome... Next server has HT.. So I'll give that a try!
> >
> >
> > Keep in mind that HT is its own special brand of hell, and isn't
> > really *true* SMP. The kernel will work fine, and you'll see 2x the
> > processors, but at most you'll get about a 3% performance boost, and
> > at worst, it'll actually hurt performance. Some motherboards have
> > buggy HT implementations and may cause some locking or slowness.
> > Sometimes this can be resolved by appending apci=ht to your kernel
> > boot line. With HT you also have the possibility of cache thrashing,
> > which can/will impact performance. Make sure you know what you're
> > getting into.
> >
> >
>
> It's not all loss. I have a small benchmark written in Perl to exercise
> the CPU a little.
> I have here two muts (machines under test),
> Mopoke's a Dell Pentium IV 3.00 with HT enabled, running Suse 10.1.
> Bilby's a Sempron 2500+, so it's a bit slower. Also, it's running
> roughly Nahant, so compiled with older (slower?) gcc and different perl.
>
> What I'm illustrating here is the difference HT can make:
>
>
> summer at Mopoke:~> time bm.perl&time bm.perl&wait
> [1] 3480
> [2] 3481
>
> real 0m23.935s
> user 0m23.689s
> sys 0m0.004s
>
> real 0m25.906s
> user 0m24.746s
> sys 0m0.004s
> [1]- Done time bm.perl
> [2]+ Done time bm.perl
> summer at Mopoke:~>
> [summer at bilby ~]$ time bm.perl&time bm.perl&wait
> [1] 10099
> [2] 10100
>
> real 0m49.343s
> user 0m24.287s
> sys 0m0.011s
>
> real 0m49.371s
> user 0m24.405s
> sys 0m0.013s
> [1]- Done time bm.perl
> [2]+ Done time bm.perl
> [summer at bilby ~]$
>
>
> Note that on mopoke, user for each is about equal to elapsed, about what
> one wout expect with dual-core or SMP.
>
> On Bilby, user for each is about half elapsed, just as one would expect.
>
> For those who like to play by themselves, here's the code:
>
> [summer at bilby ~]$ cat bin/bm.perl
> #!/usr/bin/perl
> use integer;
> $i = 0;
> while ($i < 10000)
> {
> $j = 0;
> while ($j < 10000)
> {
> ++$j;
> }
> ++$i;
> }
>
> [summer at bilby ~]$
>
>
>
>
>
>
>
Hi John,
Comparing your reference with a Dell Dimension 3100 (P4HT, 3.0GHz, 2ML2,
2GB) but with apci=ht enabled, slightly low compared as your SuSe.
I'll re-exec on new 42.0.2 next weeks without apci=ht to see differences
Fyi i've been working without it for long time without issues on 34.0.2,
just incorpored this flag in last times for security/stability after
reading others notes)
[root at sparkbox ~]# uname -a
Linux sparkbox.stigmatedbrain.net 2.6.9-34.0.2.ELsmp #1 SMP Fri Jul 7
19:52:49 CDT 2006 i686 i686 i386 GNU/Linux
[root at sparkbox ~]# free
total used free shared buffers
cached
Mem: 2065384 1708756 356628 0 6924
191476
-/+ buffers/cache: 1510356 555028
Swap: 2031608 657924 1373684
[root at sparkbox ~]# cat /etc/grub.conf | grep 2.6.9-34.0.2.ELsmp
title CentOS (2.6.9-34.0.2.ELsmp)
kernel /vmlinuz-2.6.9-34.0.2.ELsmp ro
root=/dev/VolGroup00/LogVol00 selinux=0 vga=0x031a apci=ht
initrd /initrd-2.6.9-34.0.2.ELsmp.img
[root at sparkbox ~]# cat /var/log/dmesg | grep "CPU: L2"
CPU: L2 cache: 2048K
CPU: L2 cache: 2048K
[root at sparkbox ~]# cat bin/cpubench.pl
#!/usr/bin/perl
# Usage on HT/MultiCPU host:
# time cpubench.pl&time cpubench.pl&wait
use integer;
$i = 0;
while ($i < 10000)
{
$j = 0;
while ($j < 10000)
{
++$j;
}
++$i;
}
[root at sparkbox ~]# cat /etc/issue | grep CentOS
CentOS release 4.3 (Final)
[root at sparkbox ~]# time cpubench.pl&time cpubench.pl&wait
[1] 8003
[2] 8005
real 0m30.166s
user 0m16.680s
sys 0m0.085s
real 0m30.809s
user 0m16.606s
sys 0m0.066s
[1]- Done time cpubench.pl
[2]+ Done time cpubench.pl
Cheers,
Jose.
--
-----------------------------------------------------------------
sparkbox.stigmatedbrain.net 2.6.9-34.0.2.ELsmp i686 GNU/Linux
08:40:01 up 14 days, 20:13, 76 users, load average: 1.82, 2.48, 2.27
-----------------------------------------------------------------
With regard to precipitous heights, if you are
beforehand with your adversary, you should occupy the
raised and sunny spots, and there wait for him to come up.
--The Art of War by Sun Tzu
Chapter X: Terrain
More information about the CentOS
mailing list