Compute flash life time
Hi all,
and sorry for the obvious question, but I'm trying to estimate my flash life, depending on write operation.
I'm using JFFS2:
If I have 1 M flash, and write 128byte/s in a circular buffer style: I compute, with 100000 write cycles to have a 9000 day flash life (100000 * 1024*1024/128 seconds).
But in this way I suppose that each 128 blob of data I write, effectively write 128 bytes of flash: but I'm trying to understand:
- what is the filesystem overhead?
- when I write 128 bytes, the filesystem writes effectively 128 bytes, or writes an entire sector?
- to do my computation, is it correct the formula I used, or do I need to substitute the 128 value with the flash sector size?
Sorry if the questions are obvious, but I'm almost new to JFFS2
thanks
giammy
___________________________________
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora!
http://it.messenger.yahoo.it
Quoted 8 lines · Gianluca Moro
and sorry for the obvious question, but I'm trying to estimate my flash life, depending on write operation.
I'm using JFFS2:
If I have 1 M flash, and write 128byte/s in a circular buffer style: I compute, with 100000 write cycles to have a 9000 day flash life (100000 * 1024*1024/128 seconds).
Yes, about 25 years.
Quoted 7 lines
But in this way I suppose that each 128 blob of data I write, effectively write 128 bytes of flash: but I'm trying to understand:
- what is the filesystem overhead?
- when I write 128 bytes, the filesystem writes effectively 128 bytes, or writes an entire sector?
If data can be compressed, the 128 byte number goes down a bit. For each write, jffs2 adds a struct jffs2_raw_inode. A little extra for garbage collection and some wasted bytes at the end of each erase block, which should leave you between 10 and 20 years, very roughly.
Quoted 3 lines
- to do my computation, is it correct the formula I used, or do I need to substitute the 128 value with the flash sector size?
On NOR flash, you can usually write byte-exact, so above calculation is correct.
NAND is written in pages of 512 bytes of 2048 bytes. You'd better check and test the write buffer functionality, since unbuffered writes would kill you with above numbers. But it looks as if you have NOR anyway, so don't worry.
Jörn
Signature · 4 lines
I've never met a human being who would want to read 17,000 pages of documentation, and if there was, I'd kill him to get him out of the gene pool. -- Joseph Costello