RE: [Yaffs] heavy file usage in yaffs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jacob Dall
Date:  
To: Charles Manning, yaffs
Subject: RE: [Yaffs] heavy file usage in yaffs
Hello Charles,

All file names are on a 8.3 format, and NO, I'm not using SHORT_NAMES_IN_RAM.

I've just recompiled my project defining CONFIG_YAFFS_SHORT_NAMES_IN_RAM, but unfortunately I notice no change in time used to perform the dumpDir().

The files I'm listing, was written before I defined short names in RAM. In this case, should one expect the operation to take less time?

The CPU I'm running this test on, is comparable to a Pentium I-200MHz.

The body of dumpDir() looks like this:
<code>
  d = yaffs_opendir(dname);
  if (d) {
    while((de = yaffs_readdir(d)) != NULL) {
      if (total > lastTotal + 100 * 9 * 1024) {
        printf("total = %d\n", total);
        lastTotal = total;
      }
      sprintf(str,"%s/%s",dname,de->d_name);
      yaffs_lstat(str,&s);
            switch(s.st_mode & S_IFMT){
            case S_IFREG:
        //printf("data file");
        total += s.st_size;
        break;
      }
    }


    yaffs_closedir(d);
  }
</code>


Below I've listed some rough timing for the included steps in my test - times shown is time used for the indicated step:

yaffs_StartUp - 1.4 sec
yaffs_mount - 6.7 secs (the partition I'm mounting is 30MB)
the 1. printf("total... - 1.6 sec
2. printf - 1.9
The following printf's shows after 2.1, 2.7, 5.0, 7.0, 9.0, 11.6, 14.2, 17.5, 21.2

At this point, I've been through 1/3 of the files - finishing up takes 10+ minutes.
Each file is approx. 9KB in size.

Is an increase in time consumed by each step expectable?

Is there any other (faster) way I can get hold of the file names?

Thank you for replying. I really appreciate it.

Best Regards,
Jacob



----- Original Message -----
From: "Charles Manning" <>
To: "Jacob Dall" <>,
Subject: RE: [Yaffs] heavy file usage in yaffs
Date: Mon, 17 Jan 2005 09:25:22 +1300

>
>
> > Hello yaffers,
> >
> > I'm testing yaffs1/direct in a system with a rather high file
> > write / erase rate, i.e 1 file / sek with size ranging from 5 to
> > 20KB
> >
> > Is that something possible with yaffs1?
>
> Most definitely OK. Performance numbers depend on the hardware you're
> using, but with NAND on a reasonable interface, you should be able to
> get at least 200 to 300 kbytes/sec even under heavy garbage collection.
>
> >
> > Upon boot I want to make an index table holding the names of the
> > files stored in flash. What's the best way to achieve this, when
> > the indexing has to be swift (10 - 20 secs) - using yaffs_opendir
> > / yaffs_readdir seems to take a huge amount of time (10+ mins)
> > when many files (2000-3000) are present?
>
> I'm quite surprised that it is taking so long to do this operation.
>
> One of the optimisations in YAFFS is to store short names in RAM. Do you
> have this enabled? How long are the names?
> -- Charles
>
> _______________________________________________
> yaffs mailing list
>
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs