Jffs2 and big file = very slow jffs2_garbage_collect_pass

Josh Boyer jwboyer at gmail.com
Fri Jan 18 07:48:52 EST 2008


On Fri, 18 Jan 2008 10:39:29 +0100
Matthieu CASTET <matthieu.castet at parrot.com> wrote:

> Josh Boyer wrote:
> > On Thu, 17 Jan 2008 17:26:01 +0100
> > Jörn Engel <joern at logfs.org> wrote:
> > 
> >>> If we do a ls without waiting that jffs2_garbage_collect_pass finish, ls 
> >>> takes 12 minutes to complete.
> >> Impressive!  JFFS2 may be slow, but it shouldn't be _that_ slow.  Not
> > 
> > How do you know?  A 200MiB file will likely have around 50,000 nodes.
> Yes the file got 41324 nodes.

Wow, I'm surprised I actually got close with my top of the head math :)

> > If the summary stuff is incorrect, and since we have no idea what kind
> > of platform is being used here, it may well be within reason.
> > 
> The summary stuff is correct (I check it with a parser on a dump of the 
> image). Also if the summary wasn't correct, only the mount time will grow ?

Yes, you're correct.

> In my case the mount is ok : less than 5-10s.
> The platform used is an arm926 @247 Mhz

Ok, so running at 247MHz your board has to calculate the CRCs on 41324
nodes before the file can be opened.  I have no idea how long that
should really take, but you're doing about 57 nodes per second if it's
taking 12 minutes.

As Jörn and David suggested, do some profiling to see where it is
spending most of it's time.

josh



More information about the linux-mtd mailing list