* First access to mounted jffs2 partition is slow
@ 2008-02-12 11:33 Will Wagner
2008-02-12 12:05 ` Matthieu CASTET
2008-02-12 17:21 ` DMcLeod
0 siblings, 2 replies; 4+ messages in thread
From: Will Wagner @ 2008-02-12 11:33 UTC (permalink / raw)
To: linux-mtd
Hello,
I have an ARM11 system with a JFFS2 partition in NAND flash. It works
but the first time it is accessed after mounting it can be very slow.
These are the steps I am performing:
# flash_eraseall /dev/mtd4
Erasing 128 Kibyte @ 5fe0000 -- 99 % complete.
# time mount /dev/mtdblock4 /flash -t jffs2
real 0m 1.25s
user 0m 0.01s
sys 0m 0.13s
# time ls flash - with an empty filsystem, this takes no time
real 0m 0.00s
user 0m 0.01s
sys 0m 0.00s
# cp /sdcard/bigfile flash/ - bigfile is ~8MB
# umount /flash
# time mount /dev/mtdblock4 /flash -t jffs2
real 0m 2.63s
user 0m 0.01s
sys 0m 0.50s
# time ls flash - first time we do this it takes a long time
bigfile
real 0m 11.79s
user 0m 0.00s
sys 0m 0.18s
# time ls flash - subsequent reads are fast
bigfile
real 0m 0.00s
user 0m 0.01s
sys 0m 0.00s
It was my understanding that the only slow step should be mounting the
partition when it checks the entire filesystem. Is that correct? Is it
normal that the first file operation on the partition is slow and then
all others are fast? That the mount is slow is not a problem but would
be good if we could make the first access faster even if it means the
mount must get slower.
This is using Linux 2.6.19.2 with uClibc 0.9.29, busybox 1.9.0 and
mtd-utils 1.1.0
Thanks,
Will.
--
------------------------------------------------------------------------
Will Wagner will_wagner@carallon.com
Senior Project Engineer Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: First access to mounted jffs2 partition is slow
2008-02-12 11:33 First access to mounted jffs2 partition is slow Will Wagner
@ 2008-02-12 12:05 ` Matthieu CASTET
2008-02-12 17:21 ` DMcLeod
1 sibling, 0 replies; 4+ messages in thread
From: Matthieu CASTET @ 2008-02-12 12:05 UTC (permalink / raw)
To: Will Wagner; +Cc: linux-mtd
Hi,
Will Wagner wrote:
> Hello,
>
> I have an ARM11 system with a JFFS2 partition in NAND flash. It works
> but the first time it is accessed after mounting it can be very slow.
I had a similar problem on ARM9 (see
http://thread.gmane.org/gmane.linux.drivers.mtd/20340/focus=20355 )
Matthieu
--
Matthieu Castet
Ingénieur Développement Logiciel
Parrot SA
174 Quai de Jemmapes
75010 Paris, France
Tél: +33 (0) 1 48 03 74 78
Fax: +33 (0) 1 48 03 06 66
Email: matthieu.castet@parrot.fr
http://www.parrot.biz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: First access to mounted jffs2 partition is slow
2008-02-12 11:33 First access to mounted jffs2 partition is slow Will Wagner
2008-02-12 12:05 ` Matthieu CASTET
@ 2008-02-12 17:21 ` DMcLeod
2008-02-12 18:03 ` michael
1 sibling, 1 reply; 4+ messages in thread
From: DMcLeod @ 2008-02-12 17:21 UTC (permalink / raw)
To: Will Wagner; +Cc: linux-mtd
Will Wagner wrote:
> Hello,
>
> I have an ARM11 system with a JFFS2 partition in NAND flash. It works
> but the first time it is accessed after mounting it can be very slow.
>
> These are the steps I am performing:
>
> # flash_eraseall /dev/mtd4
> Erasing 128 Kibyte @ 5fe0000 -- 99 % complete.
> # time mount /dev/mtdblock4 /flash -t jffs2
> real 0m 1.25s
> user 0m 0.01s
> sys 0m 0.13s
> # time ls flash - with an empty filsystem, this takes no time
> real 0m 0.00s
> user 0m 0.01s
> sys 0m 0.00s
> # cp /sdcard/bigfile flash/ - bigfile is ~8MB
> # umount /flash
> # time mount /dev/mtdblock4 /flash -t jffs2
> real 0m 2.63s
> user 0m 0.01s
> sys 0m 0.50s
> # time ls flash - first time we do this it takes a long time
> bigfile
> real 0m 11.79s
> user 0m 0.00s
> sys 0m 0.18s
> # time ls flash - subsequent reads are fast
> bigfile
> real 0m 0.00s
> user 0m 0.01s
> sys 0m 0.00s
>
>
> It was my understanding that the only slow step should be mounting the
> partition when it checks the entire filesystem. Is that correct? Is it
> normal that the first file operation on the partition is slow and then
> all others are fast? That the mount is slow is not a problem but would
> be good if we could make the first access faster even if it means the
> mount must get slower.
>
> This is using Linux 2.6.19.2 with uClibc 0.9.29, busybox 1.9.0 and
> mtd-utils 1.1.0
>
> Thanks,
>
> Will.
>
>
We fought that same exact problem for some time. It turned out being
that we had set the verbosity (something like FS_JFFS2_DEBUG=2) to the
highest setting. It literally took 30s or more to do an 'ls' the first
time.
HTH
--------------------------------------------------
Dennis McLeod
dmcleod@bittware.com
http://www.bittware.com
(603) 226 0404 x514
--------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: First access to mounted jffs2 partition is slow
2008-02-12 17:21 ` DMcLeod
@ 2008-02-12 18:03 ` michael
0 siblings, 0 replies; 4+ messages in thread
From: michael @ 2008-02-12 18:03 UTC (permalink / raw)
To: DMcLeod; +Cc: linux-mtd, Will Wagner
Hi,
> Will Wagner wrote:
>
>> Hello,
>>
>> I have an ARM11 system with a JFFS2 partition in NAND flash. It works
>> but the first time it is accessed after mounting it can be very slow.
>>
>> These are the steps I am performing:
>>
>> # flash_eraseall /dev/mtd4
>> Erasing 128 Kibyte @ 5fe0000 -- 99 % complete.
>> # time mount /dev/mtdblock4 /flash -t jffs2
>> real 0m 1.25s
>> user 0m 0.01s
>> sys 0m 0.13s
>> # time ls flash - with an empty filsystem, this takes no time
>> real 0m 0.00s
>> user 0m 0.01s
>> sys 0m 0.00s
>> # cp /sdcard/bigfile flash/ - bigfile is ~8MB
>> # umount /flash
>> # time mount /dev/mtdblock4 /flash -t jffs2
>> real 0m 2.63s
>> user 0m 0.01s
>> sys 0m 0.50s
>> # time ls flash - first time we do this it takes a long time
>> bigfile
>> real 0m 11.79s
>> user 0m 0.00s
>> sys 0m 0.18s
>> # time ls flash - subsequent reads are fast
>> bigfile
>> real 0m 0.00s
>> user 0m 0.01s
>> sys 0m 0.00s
>>
>>
I think that is a problem of jffs2 and I think that is related to the
time spent during the fstat64 system but
I'm not sure. I have little experince with jffs2.
Regards Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-12 18:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12 11:33 First access to mounted jffs2 partition is slow Will Wagner
2008-02-12 12:05 ` Matthieu CASTET
2008-02-12 17:21 ` DMcLeod
2008-02-12 18:03 ` michael
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox