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!

closed as not constructive by mdpc, Ward, Magellan, Bryan, Scott Pack Dec 24 '12 at 16:45

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Why use a toy benchmark when you can use a real one? – Michael Hampton Dec 23 '12 at 3:39
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.

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.

  • 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. webhostingtalk.com/showthread.php?t=924581 Additionally, all versions of unixbench will give an index score. – Grumpy Dec 23 '12 at 10:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.