Additionally, to prevent early wearout of your persistent storage, make sure to 
configure SQLite, such that temporary files are stored in RAM rather than 
Flash. Compile with SQLITE_TEMP_STORE=3 or use PRAGMA temp_store 
(https://www.sqlite.org/tempfiles.html). In an embedded system, you should 
prefer the compiler switch. Furthermore, you like to tune SQLite's page cache 
and other memory optimization parameters to adapt SQLite to your constrained 
memory resources. At least, consider to use UBIFS over JFFS2 if possible. 
SQLite in normal journaling mode and UBIFS on NAND-Flash is fast and very 
reliable, even in cases of sudden power loss during transactions.


______________________________________
 Carsten Stelling
F&E Hardware / R&D Hardware

G?RLITZ Aktiengesellschaft | August-Thyssen-Stra?e 32 | D-56070 Koblenz
T: +49-261-9285-336 | M:  | F: +49-261-9285-190
Mail to: Carsten.Stelling at goerlitz.com | www.goerlitz.com

Vorstand | Executive Board: J?rg Figge
Vorsitzender des Aufsichtsrates | Chairman of the supervisory board: Norbert 
Wagner
Registergericht | Court of registration: Amtsgericht Koblenz HRB 5346
Sitz der Gesellschaft | Registered office: Koblenz
Sind Sie bereit f?r das Schl?sselerlebnis? www.goerlitz.com/e-world-2016
Member of the IDS-Group

-----Urspr?ngliche Nachricht-----
Von: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von David 
Woodhouse
Gesendet: Dienstag, 5. Januar 2016 23:50
An: Ward WIllats; General Discussion of SQLite Database
Betreff: Re: [sqlite] Caveats using Sqlite on JFFS2 ?

On Mon, 2016-01-04 at 13:17 -0800, Ward WIllats wrote:
> Happy New Year folks.
>
> Subject says it all. Any things to look out for when using Sqlite on
> a JFFS2 filesystem? I see some old stuff from 2011 about WAL mode and
> MMAP_SHARED, but suspect that is no longer germane? Anything else to
> watch out for? (This would be for an Open-WRT style embedded Linux on
> MIPS.)

JFFS2 still doesn't support shared writeable mmap; that kind of thing
is discouraged on flash. But other than that, there should be nothing
that's really specific to JFFS2. You want to avoid doing too many
writes, obviously, but that's true for *all* flash-based storage, even
the ones which are pretending to be spinning rust and hiding the
details from the OS.

--
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation

Reply via email to