public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Long JFFS2 Mount time?
@ 2003-04-11 13:49 Marc D'Anjou
  2003-04-11 21:04 ` Kenneth Johansson
  2003-04-14 11:55 ` David Woodhouse
  0 siblings, 2 replies; 4+ messages in thread
From: Marc D'Anjou @ 2003-04-11 13:49 UTC (permalink / raw)
  To: linux-mtd


Hi,

I am using an embedded system with an IBMPPC405h and one bank (16meg)
Intel strata flash. The page size is 4k bytes. The sector size is 128k
bytes.  I am using the MTD Flash driver with the JFFS2 software version
2 (newest files dated 7/2002). I'm not sure what the CVS revision number
is? 

I am storing a system log inside the JFFS2. Only critical events are
stored there for debugging purposes. In general I only store 4 entries
per run time. Our system is such that it can go up and down daily. As
our log grows, the JFFS mount time appears to be growing quite a bit. It
went from less than 1 second when we first started, to up to 7 or more
minutes over days. 

My concern is that the mount time could grow to hours. There is a
possibility that this has happened in a system.

To test this concern, I executed a one line script that appends 450
bytes repeatedly to the log file in the JFFS2. This was continued until
the log file size grew to 2 Meg bytes.  

" cat file1.txt >> /mnt/jffs2/file.log "                  where
file1.txt contains 450 bytes (ascii text file).

Then I reset the system and watched how long it took to mount the JFFS2.
It took about 13 minutes to mount!!!!

I then did:  "ls -l" of the directory and it took about 30 minutes to
come back???????

The second and subsequent "ls -l" was very quick (normal speed for an
ls). It acted as if all the information was cached.

My understanding is that each time we append a 450 byte entry, a new
page in the JFFS2 is obtained, it copies the previous page contents,
plus the new 450 byte entry, then marks the old page for deletion. If
this is repeated many times, the Garbage Collection Task will require
more time to resolve the JFFS2 when it mounts the next time up. There
will be many pages marked for deletion, essentially a longer trail of
pages to resolve.

Is this your understanding of the problem??

Does anyone know how to get around this problem??? 

Is there newer JFFS2 software available that minimize this behavior?

 
Marc D. D'Anjou

 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Long JFFS2 Mount time?
  2003-04-11 13:49 Long JFFS2 Mount time? Marc D'Anjou
@ 2003-04-11 21:04 ` Kenneth Johansson
  2003-04-14 11:55 ` David Woodhouse
  1 sibling, 0 replies; 4+ messages in thread
From: Kenneth Johansson @ 2003-04-11 21:04 UTC (permalink / raw)
  To: Marc D'Anjou; +Cc: Mtd

On Fri, 2003-04-11 at 15:49, Marc D'Anjou wrote:

> our log grows, the JFFS mount time appears to be growing quite a bit. It
> went from less than 1 second when we first started, to up to 7 or more
> minutes over days. 

> 
> Is there newer JFFS2 software available that minimize this behavior?

I do not know I have never had a problem with long mount times on any of
the versions I used. I did however test 2.4.21-pre6 and creating a file
by appending data (512 bytes/write) did not result in any longer mount
time. 

Creating the file on the other hand was not exactly speedy.  

-- 
Kenneth Johansson	
Ericsson AB                       Tel: +46 8 719 70 20
Tellusborgsvägen  90              Fax: +46 8 719 29 45
126 25 Stockholm                  ken@switchboard.ericsson.se

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Long JFFS2 Mount time?
       [not found] <C6D44AA99ECEB540A5498F15F92DA07D8922D0@amperion01>
@ 2003-04-11 21:43 ` Kenneth Johansson
  0 siblings, 0 replies; 4+ messages in thread
From: Kenneth Johansson @ 2003-04-11 21:43 UTC (permalink / raw)
  To: Marc D'Anjou; +Cc: Mtd

On Fri, 2003-04-11 at 23:25, Marc D'Anjou wrote:
> I forgot to say that the one line command used to fill the log contains a while loop:
> 
> "while true; do cat file1.txt >> file2.log; done"
> 
> While this was executing, I monitored the file size until it reached 2 meg bytes.
> 
> Where file1.txt has 450 bytes in it.
> 
> Note: I don't think the 450 bytes is important, it could have been much smaller and still given the save results.
> 
> Marc

And I used this a few times until the file system had 100kb free. no
problem with mount or ls. 
---
#! /bin/bash

:>$1

TIMES=4096
while [ $TIMES -gt 0 ]
do
  dd if=/dev/urandom bs=512 count=1 2>/dev/null >> $1
  TIMES=$(($TIMES - 1))
done
---

-- 
Kenneth Johansson	
Ericsson AB                       Tel: +46 8 719 70 20
Tellusborgsvägen  90              Fax: +46 8 719 29 45
126 25 Stockholm                  ken@switchboard.ericsson.se

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Long JFFS2 Mount time?
  2003-04-11 13:49 Long JFFS2 Mount time? Marc D'Anjou
  2003-04-11 21:04 ` Kenneth Johansson
@ 2003-04-14 11:55 ` David Woodhouse
  1 sibling, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2003-04-14 11:55 UTC (permalink / raw)
  To: Marc D'Anjou; +Cc: linux-mtd

On Fri, 2003-04-11 at 14:49, Marc D'Anjou wrote:

> Is there newer JFFS2 software available that minimize this behavior?

The current code in CVS ought to be a lot better.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-14 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-11 13:49 Long JFFS2 Mount time? Marc D'Anjou
2003-04-11 21:04 ` Kenneth Johansson
2003-04-14 11:55 ` David Woodhouse
     [not found] <C6D44AA99ECEB540A5498F15F92DA07D8922D0@amperion01>
2003-04-11 21:43 ` Kenneth Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox