2

I wanted to do some (very rough) comparisons between different computers, seeing the relative compute performance of laptops and cloud machines (AWS EC2, rackspace, etc.).

I wanted something extremely easy and quick to run, and just wanted a rough benchmark of computation performance. Not testing parallelism, disk access, etc. I came up with the following command:

head -c100000000 < /dev/urandom | time openssl sha1 > /dev/null

That is, take 1000000000 chars from urandom, and time the duration it takes to sha1 them.

My question is: is this indeed a decent rough benchmark of a computer's processing power. Are there other toy benchmarks that might be useful in giving rough estimates of a computer's power?

Thanks!

2 Answers2

1

It's not a toy benchmark (not sure why anyone would make that), but a good simple benchmark you can use is unixbench. A very simple usage of it can be found on serverbear. You can additionally configure unixbench to only run certain parts (like skipping IO test).

Additionally, I do not find your sample code to be sufficient. It would be a single threaded, so, something like a single core Pentium 4 clocked at 4Ghz might even beat 4-way hex core (24 core) ivy bridge clocked at 2.2Ghz.

Grumpy
  • 2,979
  • 18
  • 23
1

If you use Unixbench, use the Web Hosting Talk variant. This will give you a number that can be used to compare the various services.

A more comprehensive benchmarking/platform testing utility is the Phoronix Test Suite, which I'd suggest for more in-depth analysis.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • The WHT variant you linked is 1. outdated, 2. ill performing and 3. no longer available from that page. The updated version posted on WHT is identical to the one available at googlecode. http://www.webhostingtalk.com/showthread.php?t=924581 Additionally, all versions of unixbench will give an index score. – Grumpy Dec 23 '12 at 10:37