NAND vs. SD Speeds

Good news / bad news. :slight_smile:

Good #1:

I have a rev C2 Beagleboard, and I am using Gumstix / Sakoman's new
"NAND Demo Image" that allows me to run completely out of NAND with
the latest 2.6.30 images (http://www.sakoman.com/feeds/omap3/glibc/
images/beagleboard/). This is awesome! Try it out. Plus if you have
Overo Earth, you can run it there too.

Good #2:

Gumstix has also posted instructions on how to burn the stuff into the
BB NAND: http://www.gumstix.net/Overo/view/Overo/Writing-images-to-onboard-nand/115.html.
Their instructions mostly work (except burning in the u-boot -- that
has to be done from u-boot by hand). But it's a nice process overall
-- and should fully work soon.

Bad:
The one significant observation that I have is that the NAND is
noticeably slower than the SD card. Does that make sense? I'd think
that running out of NAND would be faster than SD. But I'm seeing the
opposite.

Any ideas how to improve the NAND speed? Or is patience the key. :slight_smile:

Thanks very much.

Best regards,
Geof

On my one arm11's EVB, High-speed SD card have a faster reading speed
than NAND.

Geof Cohler wrote:

Bad:
The one significant observation that I have is that the NAND is
noticeably slower than the SD card. Does that make sense? I'd think
that running out of NAND would be faster than SD. But I'm seeing the
opposite.

I have practical experience on Nokia internet tablets and I see this too.

jffs2 uses compression so both reading and writing is (highly) CPU intensive. Even if transfer speed may be otherwise similar, with SD the CPU mostly just waits for I/O and can do other stuff or sleep. With jffs2 the CPU is spinning inside (de)compression code and also the garbage collection thread can steal CPU time in unexpected moments.
Compression is tunable - there are more methods and it can be turned off.

Also jffs2 is log based so it may take longer to mount it and enumerate files for the first time. It may also need more RAM for keeping filesystem structures cached. Beacause of this it doesn't scale to bigger sizes (512MB and up).

ubifs is new option for NAND and I have no practical experience with it. I would appreciate any comments how ubifs changes this.

IMO with jffs2 it makes sense to forget about device NAND and use SD with ext2 or ext3 (mounted with noatime) if one can sacrifice the slot. So far I was using SD/MMC as root filesystem on Nokia 770 since 2006 and on N800 and N810 since I got them, and no card died so far and I see only positives. With Nokia tablets booting from SD is also safer since with jffs2 there is no way to dump data from root filesystem if device does not boot. I guess with uboot on BB there is no such problem but still dealing with jffs2 image is harder on PC than recovering ext2/3(/4?) from SD.