Last week I did the benchmarking on a dual Athlon vs. a quad Xeon, and
thought I'd report.
The benchmark was a simple Perl script which would read in a file of SQL
statements, fork off an arbitrary number of processes, and go through the
entire list of queries in every child process, recording the overall time
to completion.
That methodology does have it's drawbacks, but for my purposes, it will
give me a fair representation of what kind of capacity I can expect from a
server. The query list was obtained by logging actual queries sent to our
production server, and thus it may or may not reflect performance in YOUR
situation. It also means that these numbers DO NOT correlate to ANY OTHER
benchmark in any manner. The list consisted of 1,000 queries.
The first machine is a SuperMicro 8050 with 4 700 MHz Xeons, 1 MB of
level 2 cache, 1.5 gigs of RAM. The second system is a dual Athlon MP
1800+ with 1 gig of RAM. Both used the following command to start the
postmaster for this test:
su postgres -c '/usr/local/pgsql/bin/postmaster -i -S -B 32768 -N 96 -d
3 -D/usr/local/pgsql/data -o "-F -S 98304"'
Because fsync was turned off and the entire database kept in disk cache,
the disk I/O should (theoretically) NOT have had an impact on this test.
If it were, it would favor the Xeon machine, having a SCSI RAID array vs.
a single IDE drive in the Athlon.
After running the test for various numbers of simultaneous clients
(1..10,16,24,32,48,64), I computed the "qpm", or "queries per minute".
The quad Xeon handled 1,000 QPM for one connection, and peaked at 1759 QPM
at 9 connections. At 16 queries, it was at 1720 QPM, and at 64
connetions, had dropped off to 1148.
The Athlon system handled 2727 QPM with a single connection, and peaked
at 4091 QPM with 6 connections. With 16, it was still handling 3855 QPM,
and had dwindled to 3257 with 64 connections.
My conclusions? Dual Athlons are FAST. Interestingly enough, they
also seemed to scale better than the quad Xeon, keeping 79% of their peak
performance with 64 simultaneous connections, as opposed to 65% with the
Xeon-based system. Compiling PostgreSQL, OpenSSL, OpenSSH, and the Linux
kernel was ridiculously fast.
As an interesting side note, after the tests, I used the parts for
their intended purpose - to upgrade one of our web servers. Afterward, I
compared it to the performance of a couple of dual P3/866 web servers. In
this setting, the dual Athlons did not fare as well as I thought they
would. They handled about 35% more traffic than the P3's, but I had
expected much more. I think it's interesting how the system shined so
well in one setting, but not nearly as well in another.
steve