Date: Sun, 04 May 1997 17:47:17 -0500 From: Alex Nash <nash@mcs.com> To: freebsd-smp@freebsd.org Subject: SMP performance (what am I doing wrong) Message-ID: <336D11F5.2781E494@mcs.com>
next in thread | raw e-mail | index | archive | help
I've just upgraded to 3.0 with SMP support, and have been pleasantly surprised with the stability of the kernel. However, I'm having a few problems getting the performance I expected. Before anyone asks, yes, I do have both CPUs running :) # sysctl -a | grep smp kern.smp_active: 2 kern.smp_cpus: 2 Using the old RC5 client we're all so familiar with, I ran a few benchmarks. Under 2.2 with one processor, I think I was getting in the low 100,000-110,000 range. Here's what I got with the SMP kernel (all results are with the system in a quiescent state): $ ./client -m rc5-56-client: Performance testing with 1000000 crypts rc5-56-client: Complete in 13.298 seconds. (75198.80 keys/sec) Now with 2 clients: $ ./client -m & ./client -m;wait [1] 1425 rc5-56-client: Performance testing with 1000000 crypts rc5-56-client: Performance testing with 1000000 crypts rc5-56-client: Complete in 24.969 seconds. (40049.51 keys/sec) rc5-56-client: Complete in 25.112 seconds. (39821.81 keys/sec) Ouch! I ran it again and got completely different results: $ ./client -m & ./client -m;wait [1] 1451 rc5-56-client: Performance testing with 1000000 crypts rc5-56-client: Performance testing with 1000000 crypts rc5-56-client: Complete in 18.588 seconds. (53797.31 keys/sec) rc5-56-client: Complete in 18.910 seconds. (52881.56 keys/sec) An interesting thing I saw in top: the cpuidle processes were at about 20% the entire time the clients were running. How could that be? Running it again produced similar results to the last run. Another benchmark I tried was compiling some software from work with various make -j options. Again the results were interesting: Real User Sys Single CPU/make -j1 4:38.7 3:20.0 0:57.8 Single CPU/make -j4 4:38.6 3:24.8 0:56.8 Dual CPU/make -j1 5:31.5 2:41.0 3:19.9 Dual CPU/make -j4 4:11.6 4:16.9 2:55.9 Dual CPU/make -j8 4:21.0 4:16.1 2:59.9 Am I missing kernel compile options? I've used SMP, and APIC_IO. If anyone has any clues as to what's going on, I'd really appreciate hearing them. Thanks. Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?336D11F5.2781E494>