1
votes

The embedded system has M68K Architecture (MCF547x based), with colilo and linux kernel 2.6.10 it used MTD (memory Type Device) NOR Flash (Spansion make). There is around 32 MB of data to be managed (all in forms of records) and memory available is 40MB as an MTD partition (JFFS2 filesystem). I wanted to understand the performance related problems or any other memory related problems which i can encounter while doing this exercise of using SQlite3 (amalgamation version).

By Memory related problem i meant frequent defrag operaton of memory partition (since that 32 MB of database will be modified almost every second).

Any experience/insights on this requirement will be very much helpful. Please share your experience on what has to be taken care.

2

2 Answers

0
votes

Writing to the MTD every second is not a good idea at all. You will get bad sectors in no time. Try saving your sqlite file in /tmp. This will considerably enhance the speed of read/write ops and prolong the MTD life.

0
votes

SPANSION NOR memories has 100k erase cycles per erase sector (128kB typically), so if your application write in it every second, your NOR lifetime will be reduced dramatically. UBIFS/YAFS/JFFS2 can help, but doesn't avoid it.