mysqld on jffs2: MyISAM Index write is slow

Charles Manning manningc2 at actrix.gen.nz
Wed Jan 19 13:34:06 EST 2005


I expect it could help to add some caching to JFFS2 to handle stuff 
like this. I did something like this for YAFFS.

YAFFS supports a "short op" cache for handling reads and writes that are 
smaller than parts of a page (it is bypassed by all whole page read/writes).  
The cache has typically 10 page-size "slots".  The cache entries associated 
with a file get flushed whenever the file gets flushed, closed or pushed out 
by a new entry.

At first I only used this cache for WinCE and YAFFS direct and disabled this 
cache for Linux, thinking that the Linux cache would do the job better. 
However, the Linux cache is  write-through cache (ie does not cache writes). 
Enabling the cache improved short write performance dramatically. I expect it 
would in this case too.

The cache is quite simple so implementing a similar cache in JFFS2 would not 
be a big deal.

-- Charles


On Thursday 20 January 2005 02:03, Artem B. Bityuckiy wrote:
> Not expert in this issue, but I was told by David that JFFS2 is
> synchronous, and you need redesigning it if you want asynchronous
> behaviour.
>
> > Hi,
> > I am using mysqld on jffs2. Tables work fine, but as soon as
> > i am using indexes the writing of new entries becomes very slow.
> > I found that mysql is writing one 1024 byte block to the index file
> > of the MyISAM table (.MYI) for every new row. This is up to 20 times in
> > sequence
> > the same block. On non synchronous filesystems
> > this goes to a Buffer in RAM, but on jffs2 this causes many writes to
> > the flash. In my amdflash emulator I found that mysql writes about 180MB
> > to the flash
> > for a table of 13MB with 88000 rows.
> >
> > Is there a way to make jffs2 a little bit asynchronous ? Or does anybody
> > know
> > how to tell mysqld to write smaller blocks ? Mounting a reiser as
> > loopback from
> > a file on jffs2 does not work because jffs2 doesn't support mmap.
> >
> > Jochen
> >
> >
> > ______________________________________________________
> > Linux MTD discussion mailing list
> > http://lists.infradead.org/mailman/listinfo/linux-mtd/




More information about the linux-mtd mailing list