Writing 4k blocks to flashB

Der Herr Hofrat der.herr at hofr.at
Wed Mar 10 01:51:23 EST 2004


> Hello,
> 
> we are trying to optimize the speed of writing large files to flash
> (Fujitsu MBM29LV650, 8 MB, 16bit). After using strace to see how long and
> how often system calls are being performed, we have found out that writing
> to flash is being done in 4kB large blocks and that each write
> takes between 0.15 and 0.3 sec. Can we optimize this figures? Would it
> make sense to modify mtd to write larger blocks to flash? Which files do
> we need to change for this modification?
>
check how much time the copy is actually spending in system and how much in 
user (time cp ... a few times should bive you a resonable average) - the 
large variance may also be due to the strace overhead (which is significant - 
your running with PTRACE set).  - it might be that you actually
have a slow flash - the numbers don't tell you what the overhead
of multiple invokations actually are.

the actual invocation times of the system call is most likely 
not the bottle neck. I would guess that the 4k make sense as thats 
alligned with the memory organisation (PAGESIZE). Did you do any comparison
with a ramdisk copy to see if its not the filesystem+flash-device that is
causing the delays ?

hofrat



More information about the linux-mtd mailing list