Mysql on flash-memory

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all,

I have a question about flash-memory lifespan.

My database consists of 1 table, the table has 50 fields of 10 bytes
each, thus each record will have 500bytes. There are 1000 records in
the table, so roughly the table will have a size of 0.5MByte. The
system will update the record sequentially, one record is updated per
second. That is 3600 update per hour or 86400 per day.

If I store this database on a 64MB flash-memory card then how long does
the card last before wearing out.

Thanks in advance,

Re: Mysql on flash-memory

dan wrote:
Quoted text here. Click to load it

I looked into this some time ago and tried to find some articles
describing the MTBF (mean time between failure) of flash memory.  Of
course there are many claims that it lasts virtually forever, but that's
what they said about CDROM's for years.

 From what I've read, MTBF for flash memory is between 1 million to 3
million hours.  Another source says that rewriting is more wearing to
flash memory, thus it can withstand perhaps 500,000 to 1 million writes
before the potential for failure increases.

Also see , where the
heading "boosting flash lifetime" appears.

Some technology vendors use "wear-leveling" to improve MTBF of flash
devices.  See the QNX Flash File System Technology Development Kit
( ), and
the SanDisk wear-leveling white paper
( )

Bill K.

Re: Mysql on flash-memory

Thanks for the interesting articles Bill,

So now I need to calculate how many times a single physical bit on the
flash get erased per day, assuming there is a wear-leveling mechanism
in place to spread out the block erase evenly. Then I can work out the
lifespan of the 64Mb flash card.

My question now is much data MySql write to flash every second ? Given
that the system updates one record of 500bytes every second. Will it
cause MySql to write to flash 500 bytes per second, or will it cause
MySql to write the whole file of 500Kbytes to flash every second ?


Bill Karwin wrote:
Quoted text here. Click to load it
( )
Quoted text here. Click to load it

Re: Mysql on flash-memory

dan wrote:
Quoted text here. Click to load it

Also note in the articles about flash technology that erasing operations
are done in blocks, not at a bit or byte level.  So I'm not sure what
happens when you try to erase or rewrite a tiny portion.  Anyway, it
seems like flash memory isn't as flexible as hard disks or RAM regarding
addressing small quantities of information.

Quoted text here. Click to load it

Depends on some settings that are under your control regarding caching.
  You can get MySQL to keep most changes in memory, only flushing them
to "disk" occasionally.

Another solution you can do is to keep tables stored on the flash
initially, but then create MEMORY tables for doing the actual work, and
copy the memory tables back to the tables stored on flash at whatever
interval of time you want.

Bill K.

Site Timeline