Many small files instead of one large files - writing, wearing, mount-time?
Artem B. Bityuckiy
dedekind at infradead.org
Wed Mar 9 05:58:44 EST 2005
On Tue, 2005-03-08 at 09:59 +0100, Martin Egholm Nielsen wrote:
> Hi there,
Hello
> Hence, me initial strategy was to have a file in NAND for each resource.
> However, I noticed that mount-time increased "severely" when many files
> were put on the device, and doing an "ls" first time on the
> device/directory took lots of time as well.
Owing to its design JFFS2 works extremely slowly wit directories
containing so many files.
> Unfortunately low mount-time is one of the factors giving the user a
> good experience with the system, so I started considering another
> strategy - namely one large file to hold all these states.
>
> However, I'm a bit concerned how fopen( ..., "rw" ) is handled
> underneith when I flush/sync the filedescriptor if I only mess with a
> small part of the file. Is the entire file flushed to NAND once more, or
> does Linux+JFFS2 handle this, and only write the parts (inodes) that are
> affected...
Don't worry, Only that "messed" peace will be flushed. The "large file"
solution will be definitely faster.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list