Re: Jffs2 and big file = very slow jffs2_garbage_collect_pass

Jamie Lokier
2008-01-18T20:05:58Z

Glenn Henshaw wrote:
> I found a similar problem on an older 2.4.27 based system. We have
> a 64k JFFS2 partition (1024 blocks of 4kbytes). As the file system
> fills up, the time for any operation increases exponentially. When it
> reaches 90% full, it takes minutes to write a file. After a cursory
> inspection, it seems to block doing garbage collection and compressing
> blocks.
>
> We gave up and limited the capacity to 60% full at the application
> level.
>
> I'd appreciate any pointer to fix this, as migrating to a 2.6
> kernel is not an option.

Yes! I have exactly the same problem, except I'm using 2.4.26-uc0,
and it's a 1MB partition (16 blocks of 64kbytes).

I am tempted to modify the JFFS2 code to implement a hard limit of 50%
full at the kernel level.

The JFFS2 docs suggest 5 free blocks are enough to ensure GC is
working. In my experience that does often work, but occasionally
there's a catastrophically long and CPU intensive GC.

-- Jamie