Low perf with smp

Eric ericd at free.fr
Thu Mar 30 16:41:32 UTC 2006

Mail NETvigieHi all,

I buy a new DELL PowerEdge 1850 with Bi-Xeon 2.8GHZ/2*2MB Dual Core 800FSB processor, 2Go DDR2 RAM, PERC4di RAID controller with 2 SCSI U320  15.000tpm 36Go hdd on RAID1.

I install on it Freebsd 6.0, apache 2.2.0 and mysql 4.1.18 and compare performance with :
OLD PowerEDge with only simple Bi-Xeon 3.0 GHZ and freebsd 4.11.

The test is simple mysql query done by php script.

Result is that test is two time slower with freebsd 6.0 and dual-core than with old server.
I try with and without smp and  threaded kernel and results are same.
I came back to Generic kernel to see if it come from my kernel configuration but result was same.

I then though it come from server and try to upgrade an other one and have same result.
I then think it come from 6.0 and try with 6.1 beta4 and see same result
I then downgrad to 4.11 without smp and then find good perfs.
So I just add to 4.11 generic kernel : 
options         SMP                     # Symmetric MultiProcessor Kernel
options         APIC_IO                 # Symmetric (APIC) I/O

And then perf go back down from 30secondes to 54 sec.
I search a lot on internet and try with this : sysctl machdep.cpu_idle_hlt=0
But result is same.

When doing whith smp top it's just as mysql have to wait to have cpu. During 10,20 sec it just go to 2,4% then grow. Without smp it grow very quickly.

Does anyone know what's go wrong and what do I have to do to have same perf with smp than without?



More information about the freebsd-smp mailing list