I want to know how many bytes per second can I write to the disk and read from it.
How can I do that on linux machine?
Use a benchmark tool like bonnie(++). It's easy to install on about every distribution, and since it measures different aspects, you get quite a good picture how the system performs in a given situation.
If you just want to use basic tools, you could use dd:
For write speed:
(The product of bs and count should be at least twice your RAM size)
For read speed:
Remember that this is a very rough estimate and measures a situation that is unlikely to occur in normal operations.
I would just use hdparm to measure the read speeds of the drives:
you can test read speeds on formatted drives with data on it but be careful with writing as if wrongly used can corrupt data.
Hope that helps, RayQUang
Josh Berkus gave a pretty detailed talk at pgCon 2009 on performance tuning; the first half or so is just dedicated to measuring disk I/O and solutions. It's big and long, but you only need to watch it once to get an idea of what sorts of things to think about.
Also take a look at the benchmarking video, which covers much of the same content.
Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?