On Thu, Oct 2, 2008 at 4:20 AM, Paul McMahon <[EMAIL PROTECTED]> wrote:
> What's the consensus on using sqlite with flash based storage such as sd
> cards on embedded devices?
>
> Has anyone done this successfully yet with a real product (that needs to
> last a few years in the field)?
>

We've got several (Linux-based) embedded products using SQLite
databases.  One has an M-Systems SoC with Ext3 on top of TFFS, another
uses CompactFlash with Ext3, and yet another uses a directly-addressed
NOR chip with JFFS2.  None have had any problems related to SQLite.

How long it lasts depends (obviously) on the amount of data you're
pushing through on average.  For the NOR device, I implemented a test
system with SQLite, set up a simulator to model worst-case conditions
for the device so that it was writing to the database about as much as
it ever would, and hooked the MTD layer to count the number of erased
blocks over a pre-defined period of time.  You can then use that rate
and the size of the partition to figure out how long it'll take to hit
e.g. 100k erase cycles over the whole device.  For SD you don't know
how well it's doing wear-leveling behind the scenes, so throw in a
multiplier to account for that, and you'll at least get an
order-of-magnitude accurate idea of how long it'll last worst-case.

-- 
Matthew L. Creech
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to