On 04/12/2012 01:10 AM, Peter Easthope wrote:
Any tips about Flashbench?  Googling "site:debian.org flashbench"
suggests it finds little interest in the Debian community.

Thanks, ... Peter E.

I got some odd results, I'm still trying to figure it all out & I'd like some help too, I'm really just sorting out my confused notes here as while I was trying to do this a couple of weeks ago my thinking jelly got ouchie, this link has helped a bit,
http://blogofterje.wordpress.com/2012/01/14/optimizing-fs-on-sd-card/
one problem is I don't really see much difference in the benchmark results, probably because my benchmarking script is so rubbish the drive isn't the bottleneck.

after installing git & build-essential I did

mkdir ~/git
cd ~/git/
git clone git://git.linaro.org/people/arnd/flashbench.git
cd ~/git/flashbench/
ls
#vim ~/git/flashbench/README
make

# simple I know but..

# find your target drive & take a note of the factory defined start sector as this is hopefully aligned on an erase block
fdisk -cul

# so my 32GB SanDisk Ultra SDHC card looked like
Disk /dev/sdc: 31.9 GB, 31914983424 bytes
255 heads, 63 sectors/track, 3880 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            8192    62333951    31162880    c  W95 FAT32 (LBA)

# my SanDisk USB pen drive & my Kingston SD card had a start sector of 2048 but my 120GB OCZ Agility3 had no partition table on it at all

# Define variable for the target drive so commands can be pasted into a terminal window (replace X with your drive letter)
trg=/dev/sdX
# Backup the partition table for the target drive
mkdir -p ~/backup/
umount ${trg}*
dd if=${trg}* of=~/backup/${trg}_mbr_512.ddimg bs=512 count=1

# fill the start of the drive with random noise as apparently unused drives sometimes give odd numbers THIS WILL BLANK THE DRIVE, DON'T DO THIS IF THERE IS ANYTHING ON THE DRIVE YOU WANT, IN FACT YOU NEED TO UNCOMMENT THE DD COMMAND IF YOU WANT TO ACTUALLY DO IT

umount ${trg}*
#dd if=/dev/urandom of=${trg} bs=1M count=128

#Lets run flashbench, this is on my 32GB SanDisk Ultra SDHC card
cd ~/git/flashbench/
./flashbench -a ${trg}
align 8589934592        pre 1.8ms       on 2.02ms       post 1.82ms     diff 
211µs
align 4294967296        pre 1.81ms      on 1.97ms       post 1.76ms     diff 
179µs
align 2147483648        pre 1.84ms      on 2.03ms       post 1.83ms     diff 
193µs
align 1073741824        pre 1.82ms      on 1.95ms       post 1.85ms     diff 
117µs
align 536870912 pre 1.78ms      on 1.99ms       post 1.87ms     diff 162µs
align 268435456 pre 1.84ms      on 2ms  post 1.83ms     diff 167µs
align 134217728 pre 1.8ms       on 1.99ms       post 1.78ms     diff 203µs
align 67108864  pre 1.8ms       on 1.92ms       post 1.83ms     diff 104µs
align 33554432  pre 1.78ms      on 1.88ms       post 1.8ms      diff 91.3µs
align 16777216  pre 1.79ms      on 1.93ms       post 1.8ms      diff 134µs
align 8388608   pre 1.78ms      on 1.85ms       post 1.73ms     diff 102µs
align 4194304   pre 1.79ms      on 1.84ms       post 1.79ms     diff 54.6µs
align 2097152   pre 1.8ms       on 1.83ms       post 1.79ms     diff 32.1µs
align 1048576   pre 1.82ms      on 1.81ms       post 1.82ms     diff -9261ns
align 524288    pre 1.85ms      on 1.84ms       post 1.83ms     diff 7.86µs
align 262144    pre 1.79ms      on 1.82ms       post 1.84ms     diff 3.73µs
align 131072    pre 1.8ms       on 1.78ms       post 1.83ms     diff -30388n
align 65536     pre 1.8ms       on 1.79ms       post 1.79ms     diff -4769ns
align 32768     pre 1.84ms      on 1.79ms       post 1.76ms     diff -13269n

# to help you spot where you are in the output 134217728 = 128MB & 524288 = 512k; so as the difference halves from ~100µs or more to 55µs at 4194304 = 4MB if I'm reading the README correctly this would imply that the erase block size on this card is 8MB

One thing I don't understand is, if that is the case, how come the origonal partition started at 4MB
8192 * 512 = 4194304

Irrespective I now start the partition for this SD card at 16384 that way, it's allied on a 4MB & an 8MB boundary, I haven't yet figured out what open AUs are and what to do with them, I got slightly disheartened when on my OCZ SSD drive it didn't seem to make any difference to speed where I started the partition, I need to try again with a CF or SD card, maybe it was a buffering thing.

That's where I've got so far, not sure I've helped you but my note are now a little more ordered.

Let us know how you get on

BstRgetc


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f8a6cf4.9060...@homeurl.co.uk

Reply via email to