performance discrepancy between UP and SMP

Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Wed, 14 Jan 1998 01:59:27 -0800 (PST)


UP Machine: single pentium-II 266 w/128Mb 10ns SDRAM, linux 2.1.62

SMP Machine: dual pentium-II 266 w/512Mb 10ns SDRAM, linux 2.1.77

I ran apache/1.3b4-dev set up for 5 clients maximum, no logging. For a
stress I ran zeusbench across 127.0.0.1, 5 clients using keep-alive,
requesting a 6k file. Disk I/O and RAM are not an issue.

The UP machine achieves 1550 req/s. The SMP machine achieves 682 req/s.

I tried cranking apache and zb up to 30 clients and the SMP machine got
685 req/s. On a whim I tried running apache nice +4, my guess was that zb
was getting starved (processor affinity gone awry?). This got 720 r/s.

I tried running two zb's each with 15 clients and couldn't get them to do
better than 550 r/s total.

So anyway, this is a kind of lame "benchmark" for various reasons. But I
just thought I'd mention it in case someone wants to take a look at why
there's such a vast diff.

If you want to reconstruct this visit dev.apache.org:/httpd/from-cvs and
grab a recent snapshot of Apache. You'll find zeusbench in src/test/zb.c
in the tarball. I made some compile-time tweaks but I doubt you'll have
to to see these numbers, you should be able to get 1200 r/s easily without
knowing all the dials and knobs. I ran with a completely cooked run-time
configuration file, it's below.

Dean

Port 8080
ServerRoot /tmp/apache
DocumentRoot /tmp/apache
MaxClients 30
StartServers 30
MinSpareServers 1
MaxSpareServers 30
MaxRequestsPerChild 100000
ResourceConfig /dev/null
AccessConfig /dev/null

<Directory />
AllowOverride none
Options FollowSymLinks
</Directory>