Often, at the beginning of a project, it is useful to test the devices that will be used to realize the project itself.

For hard drive and compact flash it is useful to test thei performances, so we can make use of the correct (for our project) HD or CF.

To make drive benchmark test and analyze read and write performance we could use the dd program. dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data But it can be used for a lot of other purposes.

Writing performance test

 

localhost ~ # dd if=/dev/zero of=./file4GB.tmp bs=1M count=4096

4096+0 records in

4096+0 records out

4294967296 bytes (4.3 GB) copied, 78.191 s, 54.9 MB/s

The above command creates a file 4GB long containing only zeros. It writes 4096 times a block of data of 1 MB.

 

Reading performance test

localhost ~ # dd if=file4GB.tmp bs=64k | dd of=/dev/null

65536+0 records in

65536+0 records out

4294967296 bytes (4.3 GB) copied8388608+0 records in

8388608+0 records out

4294967296 bytes (4.3 GB) copied, 45.0316 s, 95.4 MB/s

, 45.0323 s, 95.4 MB/s

So I can say that my CF performs reads at 95.4 MB/s and writes at 54.9 MB/s, or better the estimation of teh performance of my CF with the above conditions are: reads at 95.4 MB/s and writes at 54.9 MB/s.
 
We can make more test to go deep on this analisys. For me it is important to make tests with different size for the blocks we want to write or read.
 
With an old compact flash I obtained the following result:
 
As you can see if my new application uses 256KB blocks of data the old CF has good results.
 
 
Gg1