It's possible to use sysbench to measure how fast commits can be flushed to disk, using the standard fsync call just like the database defaults to. Note that in this case, the file size being used is 16384 bytes, even though PostgreSQL block writes are 8192 bytes. The version tested here didn't work correctly with the block size reduced that far, and as the actual amount of bytes doesn't impact the commit rate until it becomes much larger anyway, that's not worth worrying about. The following is a Linux-specific script that includes disabling, and then re-enabling, the drive's write cache, but the basic sysbench call can be used on any platform the program runs on:
#!/bin/sh DRIVE="/dev/sda" PREFIX="$HOME/sysbench-0.4.10" ...