Monday, December 08

Geek

A Trying Time


Although my IDE RAID, network controller and video card aren't working properly, I was still able to install Fedora Linux on the box and run a few tests. (Hint: Don't wiggle the mouse while it is starting up the X server during installation. This will crash the X server and you will have to reboot and start over.)

Anyway, I wrote a couple of little Python scripts to test relative performance on CPU-intensive and bandwidth-intensive tasks. The actual work involved is just manipulating meaningless strings, but since I do a lot of that this is probably not a bad thing. The machines tested are running different versions of Linux and of Python, so the results aren't particularly meaningful, but I will present them anyway.

The systems on test are:

Yuri: A shiny new dysfunctional Athlon XP 2800+
Misa: The web server hosting mu.nu, a P4 Celeron 1.7
Lina: A somewhat reliable Dual P3-800
Kodachi: An Athlon 1.2 with the least reliable storage system in the Southern Hemisphere

Program one makes a string containing the phrase "woot!" and repeatedly quintuplicates it out to 3125 bytes:

for j in range(0,10):
    for k in range(0,10000):
        s='woot!'
        for i in range(0,4):
            s=s+s+s+s+s
    print j, len(s)

Results: (total CPU times in seconds)

Yuri1.26
Misa2.83
Kodachi2.49
Lina4.09

No real surprises here. Yuri is about twice as fast as Kodachi, despite only having a 70% higher clock speed. This illustrates real advances in the Athlon core over the last three years. The Athlon 64 should do even better, but I don't have one.

Program two is intended to stress the memory system: It continues the quintuplication until the string is 48,828,125 bytes long, containing 9,765,625 copies of the word "woot!". I expect the older systems with their PC133 memory to suffer. I also expect that Kei, my so-new-I-haven't-built-it-yet Pentium 4, will rule here, with its 800MHz front side bus.

for j in range(0,10):
    s='woot!'
    for i in range(0,10):
        s=s+s+s+s+s
        print len(s)

Results: (times in seconds)

UserSystemTotal
Yuri3.291.124.41
Misa2.125.057.17
Kodachi8.253.2711.52
LIna7.116.8813.99

This time Misa with its 400MHz bus manages to outrun Kodachi with its 200MHz bus (and 133MHz memory). Suprisingly low user time from Misa is balanced by a surprisingly high system time. I repeated all of the tests and the results are consistent.

Yuri with its 333MHz memory bus - 2.5 times as fast as the 133MHz memory on Kodachi - gets almost exactly 2.5 times the performance.

Program three is a cache-cruncher - it creates a 15,625 byte string and does a search-and-replace on it:

s='waat!weet!wiit!woot!wuut!'
t=s
for i in range(0,4):
    t=t+t+t+t+t
for j in range(0,10):
    for k in range(0,1000):
        u=t.replace('t!','py?')
    print j, len(t)

Results: (total CPU times)

Yuri3.77
Misa10.87
Kodachi6.20
Lina9.50

And the Celeron, with its smaller caches, crashes to the bottom of the list. I think this may be the problem we're having with Movable Type - a Celeron just can't handle the template processing very well. I'll be running these same tests on a P4 later this week, so we'll see the exact difference.

Either a slightly disappointing result from Yuri here, or an impressive result from Kodachi, as the speedup is less than the ratio of clock speeds this time.

More to follow...

Posted by: Pixy Misa at 02:06 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 537 words, total size 4 kb.

1 I found a serious bug in all your code. It's supposed to be "w00t", not "woot".

Posted by: Rossz at Monday, December 08 2003 03:31 PM (43SjN)

2 Stupid posting code. It' changed the two zeros to ohs in my posting.

Posted by: Rossz at Monday, December 08 2003 03:32 PM (43SjN)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
48kb generated in CPU 0.014, elapsed 0.1088 seconds.
56 queries taking 0.099 seconds, 340 records returned.
Powered by Minx 1.1.6c-pink.