Utility to find ideal blocksize.
Utility to find ideal blocksize.
Posted Mar 6, 2011 15:05 UTC (Sun) by gmatht (subscriber, #58961)Parent article: Optimizing Linux with cheap flash drives
http://dansted.co.cc/scripts/detectblocksize.c
For example, I found on my device if we write sequentially, writing of blocks of 64K is sufficient to maximize the data transfer rate, while if blocks are written randomly, 4MB is required.
This utility was discussed on the linux-bcache list, but the old mail archives don't seem to be on the web. I could discuss this further if anyone is interested.
Posted Mar 9, 2011 15:50 UTC (Wed)
by arnd (subscriber, #8866)
[Link]
flashbench --open-au --open-au-nr=<NR> --erasesize=$[4096 * 1024] [ --random ]
with varying values for NR. With low numbers, it will be fast for all block sizes, while with large numbers of open segments, the time to write all segments is basically independent of the block size, because every write forces a garbage collection on one of the other open segments.
There is usually a very sharp contrast between the slow and fast results, e.g. five being very fast but six already being very slow.
Utility to find ideal blocksize.
