Re: jffs2 fragmentation
David Woodhouse <[email protected]>
| Newsgroups | gmane.linux.drivers.mtd,gmane.linux.file-systems.jffs |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2003-10-31 at 12:24 +0100, Jörn Engel wrote: > If your explanation is correct, a shift from 4 to 28 minutes would > correspond to 6 clean nodes reused for every 1 dirty node deleted and > new node written. > > Doesn't make a lot of sense with a filesystem that should be >80% free > or dirty, does it? Hmmm. The figure of 87% was _with_ the large file, wasn't it? How full is it when the large file is deleted? When it's 80% full it does make sense. It's 80% full. 20% "free or dirty". Your 20% free space is mixed in with the clean data; you have to move 6 nodes out of the way for every node's worth of space you recover. Consider the case where every eraseblock has 80% clean data and 20% of each contains part of the large file you've just deleted, and is hence now dirty. Then you write the same large file again. Garbage collection happens -- each time we GC a full eraseblock we recover and rewrite 80% of an eraseblock of clean data, and we manage to write 20% of an eraseblock of the new file. The 80/20 ratio hence remains stable. -- dwmw2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/