# HDD benchmarking

## Spida

I heard that hdd-benchmarking results of hdparm were somewhat unreliable.

Since bonnie++ is can be configured to test really big reads/writes on the hdd, I have been using that for a while now. That way, it is possible to see what performace is seen by the application (and the user) and and not what performance the hdd may theoretically be able to deliver.

Has anybody experiences with this? Different results from bonnie++ and hdparm?

----------

## meowsqueak

It makes sense that they should differ - as you suggest, hdparm simply tests the interface throughput at 'saturation' and doesn't make any allowances at all for real-world usage. You could probably consider the hdparm result as an upper bound on throughput.

I've run bonnie and hdparm benchmarks on a few of my drives. Bonnie, IIRC, tests the filesystem rather than the disk itself, so it's more useful for comparing, say, XFS with reiserfs. I did discover that XFS is really fast compared to ext3, but much slower when unlinking files.

So the two tools, in my opinion, test different things and they are both useful. Neither replaces the other.

----------

## taskara

I want to use bonnie++ to test some external hdd's, can someone tell me how to use the command with an example? cheers!

----------

## meowsqueak

I think the default options work fine. Just run it on an existing filesystem.

----------

## taskara

I think you actually need to run it with options.

like 

```
bonnie++ -r 500 -s 1000 -x 10 -d /mnt/external
```

that should run it using 500 mb ram, and using 1gb files, 10 loops on external device.

I'll give it a go and post the results.

chris

----------

## taskara

ahh ok..

just had to specify 

```
bonnie++ -d /mnt/external -u root
```

results coming soon

----------

## taskara

here are the results:

USB

 *Quote:*   

> genserv root # bonnie++ -d /mnt/external/ -u root
> 
> Using uid:0, gid:0.
> 
> Writing with putc()...done
> ...

 

Firewire

 *Quote:*   

> genserv root # bonnie++ -d /mnt/external/ -u root
> 
> Using uid:0, gid:0.
> 
> Writing with putc()...done
> ...

 

----------

## meowsqueak

At first glance, it seems the firewire is faster, but uses more CPU. I find the results a bit hard to read in my proportional mozilla font - if I had the time, I'd copy them to emacs and make a proper comparison, but that will have to wait.

Thanks for the info.

----------

## taskara

nps.. yeah I drew the same conclusion.. which I found strange.. anyway.

if firewire IS faster, then it is copying more data at once, which stands to reason it would use more cpu.

u could average it out to find average usage vs time and compare that to usb..

----------

