Improving JFFS2 write latency
David Wuertele
dave+gmane at wuertele.com
Mon Feb 22 13:36:03 EST 2010
My linux-2.6.18 system has a 45MB JFFS2 partition which must store two 15MB
files and hundreds of small (<64kB) files. The files are written often and
deleted often, so even though the filesystem is nowhere near full there tend to
be very few free blocks available. I am trying to improve the maximum latency
of writing the small files. I am willing to sacrifice some capacity of my
partition.
Normally, small file writes complete in under a second, but sometimes when there
is garbage collection to be done, the writes take over ten seconds. I would
like to tune JFFS2 in such a way that small files always write in under one
second.
It appears to me that the values in c->resv_blocks_write and
c->resv_blocks_gctrigger should affect the maximum latency of a write that does
GC. If resv_blocks_write is a large percentage of the partition size, then
there should always be lots of free blocks around in which to do GC, so GC
should be easier. If (resv_blocks_gctrigger-resv_blocks_write) is large, then
GC should be triggered by writes long before GC is really needed, so the GC that
the write does should be minimal.
Is this logic correct? Are there any other ways that I can improve the write
latency for small files, especially given that I'm willing to sacrifice some
capacity of my partition?
Thanks,
Dave
More information about the linux-mtd
mailing list