Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What's the best tool to benchmark a linux machine? I'm comparing machines from two different cloud providers. It needs to be a command line tool. Just need to benchmark CPU and I/O performance.

share|improve this question
add comment

4 Answers 4

Benchmarking CPU and I/O in isolation is pointless. Benchmark your exact workload.

share|improve this answer
add comment

I also find sysbench pretty useful.

On my cloud machines, I often run:

for i in cpu threads mutex memory; do
        sysbench --test=$i run
done

Note that there are many, many test options, and two more modes that require a bit more setup (fileio and oltp).

I use this to determine the relative speed of various instances I launch with my cloud providers. Not all EC2 instances are created equal ;-)

share|improve this answer
1  
Just so you know, posting the exact same answer to two or more questions gets you noticed really quickly. It's best to avoid doing so. –  Iain Feb 23 '12 at 12:47
    
Hmm, okay, sorry. I think it's a viable answer to both questions. Would it be better to mark the question a duplicate? Or link to the other answer? –  Dustin Kirkland Feb 23 '12 at 16:57
    
Duplicate answers are automatically detected and flagged to moderators. If you think one question is a duplicate of the other then you can flag as such for moderator attention. When you have enough rep you'll be able to vote to close yourself. –  Iain Feb 23 '12 at 18:49
    
Cheers, then, thanks. –  Dustin Kirkland Feb 23 '12 at 19:30
add comment

You can measure the disk performance with "hdparm" if you know the name of the device.

For the CPU the best bet is to consider a prototype of the program you actually want to run there, as the provider may have CPU throtteling depending on the amount of CPU used.

share|improve this answer
    
hdparm is a poor way of benchmarking disk performance, as it only measures buffered and cached read access. It doesn't attempt to measure write performance, nor to measure the IOPs capacity of the drive. Use a tool like bonnie++ instead. –  Daniel Lawson Oct 10 '09 at 4:39
    
Depends on OP's definition of "best". –  Thorbjørn Ravn Andersen Oct 10 '09 at 21:51
add comment

I second David's suggestion of benchmarking your actual workload. If that's not possible, you could try something like bonnie++ for benchmarking I/O.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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