PDA

View Full Version : Quickie Linux Benchmark Script



Dyyryath
05-21-2002, 02:09 PM
I was curious how some of my systems compared at crunching DF so I wrote a really quick Perl script to give me some performance estimates.

It's based on real-world time not processor time, so it is affected by a system's non-DF load/usage. This is, however, what I was looking for when I wrote it. I want to know how much my machines are *really* doing, not what they are theoretically capable of.

With that in mind, my script checks the time the client was started (via it's lock file creation date/time), and then it's progress.txt file for how many structures it's completed since then. Given these two pieces of information, it calculates how many structures the system is averaging per second, minute, hour, and day.

I also had it pull some basic info about the system's kernel and processor.

The output looks like this:



------------------------------------------------------------
Distributed Folding Linux Benchmark Script V1.0

Sample Size: 100984 structures over 145627 seconds.

Structures Per Second: 0.69
Structures Per Minute: 41.61
Structures Per Hour: 2496.39
Structures Per Day: 59913.36

Linux OS - Running Kernel Version 2.4.18-6mdk
AMD Athlon(tm) processor @ 1400mhz (256 KB cache)
------------------------------------------------------------


If you are interested in using this script, you can get it right here (http://www.free-dc.org/downloads/tools/df-linux-bench.pl).

To use it, just copy it to your Distributed Folding directory, and set it's permissions to 755 (or something similar) with 'chmod 755 df-linux-bench.pl'. Then just execute it in place.

Dyyryath
05-21-2002, 03:26 PM
For those interested strictly in the results (rather than experimenting with the script itself), I'm going to post a handful of results from some of my various systems in this thread (http://www.free-dc.org/forum/showthread.php3?s=&threadid=855) over in the Free-DC part of the forums.

Digital Parasite
05-21-2002, 04:22 PM
I have taken Dyyryath's Linux Perl script and modified it to work on Windows if you have something like ActivePerl (http://www.activeperl.com/Products/Download/Get.plex?id=ActivePerl) installed.

It should be attached to this message. The way his script works is by reading the timestamp on the .lock file, subtracting the current time from it and dividing by the number of structures as reported by progress.txt file. This works fine if you are starting fresh but if you are not connected to the Internet so you have files queued up, the benchmark info will be invalid because progress.txt will report more structures completed than what you did from the creation of the current .lock file.

Rename the attachment to df-win-bench.pl and run from a command prompt in Windows in your Distributed Folding directory while your client is running.

Stardragon
05-22-2002, 09:55 AM
Hey guys!

I just wanted to say thanks for writing these handy tools, which I know will be used and appreciated by many of our members.

Keep up the enthusiasm and good work! :thumbs:

Dyyryath
05-22-2002, 11:53 AM
Not a problem, glad to be of service. ;)

I've actually got a .NET based version I slapped together for my Windows boxes, though I haven't posted it. It's written in C# and requires the .NET Framework be installed on your system to use it.

This isn't an issue for me since I've got it loaded on all of my systems, but others may not have installed it yet. The .NET Framework *is* available as part of the Windows Update site.

If anyone has it loaded (or is willing to load it) and wants to use my Windows version, let me know and I'll be happy to post it.

It works exactly like the Linux version (including the OS & processor type/speed tagging at the bottom). This might be an option for people who don't want to load Perl on their Windows systems.

MAD-ness
05-22-2002, 06:56 PM
Since, using the "-g" option we can set how often the progress.txt file is written (in terms of structures generated) might this not be a better option for accurate benchmarking? Set the "-g" option to a certain number of structures generated and then find a time/structure ratio this way.

Either way you run into issues of CPU utilization by other programs, how to distinguish between real/cpu time (on Win9X this is especially ugly, isn't it?), etc.

Nice work guys.

plaidfishes
05-23-2002, 02:38 AM
:shocked: Daaammnnnnn you guys just wrote/debugged benchmarks for a *lot* of different platforms in at least 2 different languages within a couple days.
I detect the presence of true computer gods

:notworthy :notworthy :notworthy :notworthy