June 2017
Intermediate to advanced
478 pages
13h 14m
English
To make optimum use of the underlying flash memory, you need to know the erase block size and page size. Manufacturers do not publish these numbers as a rule, but it is possible to deduce them by observing the behavior of the chip or card.
Flashbench is one such tool. It was initially written by Arnd Bergman, as described in the LWN article available at http://lwn.net/Articles/428584. You can get the code from https://github.com/bradfa/flashbench.
Here is a typical run on a SanDisk 4GB SDHC card:
$ sudo ./flashbench -a /dev/mmcblk0 --blocksize=1024align 536870912 pre 4.38ms on 4.48ms post 3.92ms diff 332µsalign 268435456 pre 4.86ms on 4.9ms post 4.48ms diff 227µsalign 134217728 pre 4.57ms on 5.99ms post 5.12ms diff 1.15msalign ...
Read now
Unlock full access