Re: [iPAQ] jffs2 slow on little writes ?

From: Erik Bågfors <erik_at_bagfors.nu>
Date: 15 Jan 2003 11:37:13 +0100

On Wed, 2003-01-15 at 11:13, wim delvaux wrote:
> Hi all,
>
> Say that you have something like ...
>
> SomeIO( char * File ) {
> int fd, i
> i = 0
> fd = open( File );
> while( i < 1000 ) {
> write( fd, &i, sizeof(i) );
> i ++;
> }
> }
>
> SomeIO( "FileOnFlash" ) // is SLOW, which is expected
> SomeIO("FIleOnRam") // is FAST, which is expected
>
> /* BUT WHY is this MUCH faster than the SomeIO("FileOnFlash")
> SomeIO("FileOnRam)
> system( "cp FileOnRam FileOnFlash)"
>
>
> Can anybody explain ?

Because you are writing in really small blocks. The cp-command is
writing in larger blocks..

I assume anyway...

/Erik

--
Erik Bågfors               | erik_at_bagfors.nu
Supporter of free software | GSM +46 733 279 273
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32
Received on Wed Jan 15 2003 - 10:37:42 EST

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 18:33:21 EDT