Skip to content

Commit 654986d

Browse files
committed
add caveats and filesystems readme files
1 parent d422b13 commit 654986d

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

CAVEATS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# CAVEATS
2+
3+
This is a document that lists some caveats that you need to consider when dealing with Litestack and SQLite applications
4+
5+
## Single host (server) only
6+
7+
By design, SQLite can be accessed only (in a performant and safe way) from a single host machine. That means that you cannot have things like auto-scaling of app servers since there is but a single one of them. This app server can be a huge one, with many processes, but only one app server at a time.
8+
9+
## Containerization becomes a bit tricky
10+
11+
Container technology was originally designed for stateless applications. Based on this, one of the core aspects of containers is that they are immutable, deploying an app to container means destroying one container and creating another. With statefull applications, like database servers and similarly SQLite based applications, this will potentially mean a down time will be perceived, which in some approaches is mitigate but not perfectly (yet). Expect some quirks when dealing with SQLite and containers.
12+
13+
## Single writer / multi reader
14+
15+
In its default configuration, Litestack allows one writer at a time to write to the database file, while simultaneously allowing any number of readers to access the database. Generally SQLite is pretty fast in writes, but you should be aware that a long running write operation will prevent any other writers from proceeding, for example creating an index on a very large table will stop other writers until the index creation is finished. There is no concurrent index creation facility in SQLite, yet.
16+
17+
18+

FILESYSTEMS.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Filesystems & Litestack
2+
3+
In the containerized world we live in, many layers of the hardware/software stacks are far abstracted that we no longer know they exist. For the filesystem enthusiasts out there this is a quick overview of how Litestack (and hence SQLite) can benefit from different filesytems
4+
5+
## XFS
6+
7+
A very stable and trusted filesystem with excellent performance charactersitcs
8+
9+
- Fast reads / writes
10+
11+
## EXT4
12+
13+
Another stable and performant filesystem
14+
15+
- Fast reads / writes
16+
17+
## F2FS
18+
19+
Specially built for solid state storage, has an atomic write mode that is supported by SQLite
20+
21+
- Fast reads
22+
- Reasonably fast durable writes in synchronous mode
23+
- Compression (not very useful)
24+
25+
## ZFS
26+
27+
Copy-on-write filesystem with a nifty set of features, very fast snapshotting but only for the FS as a whole, can send incremental snapshots to another host for backup. Naturally a lot more pages are written on write operations thus it is a bit slower in writes.
28+
29+
- Fast reads
30+
- Slower writes
31+
- FS Snapshotting with send/recv
32+
- fast device cache
33+
- Compression
34+
35+
## Btrfs
36+
37+
Another CoW filesystem that delivers snapshotting and incremental send/recv at a much granular level.
38+
39+
- Fast reads
40+
- Slower writes
41+
- Fast copies (free backups)
42+
- Sub volume Snapshotting with send/recv
43+
- Compression
44+
45+
## Bcachefs
46+
47+
A new CoW filesystem built on the foundations of the bcache module. Improving rapidly but still lacks a few of the common CoW fs features
48+
49+
- Fast reads
50+
- Slower writes
51+
- fast device cache
52+
53+
54+
55+

0 commit comments

Comments
 (0)