blackbeard420

blackbeard420 / bench.md

Last active 3 weeks ago

Like 0

blackbeard420 revised this gist 3 weeks ago · 43ab6a6

No changes

blackbeard420 revised this gist 3 weeks ago · bcc532a

1 file changed, 7 deletions

bench.md
@@ -6,13 +6,6 @@
6 6 | Database engine | 3.53.3 | 17.11 |
7 7 | Full-text implementation | FTS5 | `tsvector` with `simple` dictionary and GIN |
8 8
9 - ## Existing-database startup
10 -
11 - | Single observed provider initialization | SQLite | PostgreSQL |
12 - | -------------------------------------------------- | ---------: | ---------: |
13 - | Enable duration | 0.002589 s | 264.708 s |
14 - | Database size after initialization and maintenance | 8.008 GB | 15.195 GB |
15 -
16 9 ## Results
17 10
18 11 All **11,640 measured operations** completed without errors. The tables pool

blackbeard420 revised this gist 3 weeks ago · 76275aa

1 file changed, 45 insertions

bench.md (file created)
@@ -0,0 +1,45 @@
1 +
2 + | After loading and initial maintenance | SQLite | PostgreSQL |
3 + | ------------------------------------- | --------: | ------------------------------------------: |
4 + | Messages | 4,360,000 | 4,360,000 |
5 + | Database size, decimal GB | 8.008 | 14.324 |
6 + | Database engine | 3.53.3 | 17.11 |
7 + | Full-text implementation | FTS5 | `tsvector` with `simple` dictionary and GIN |
8 +
9 + ## Existing-database startup
10 +
11 + | Single observed provider initialization | SQLite | PostgreSQL |
12 + | -------------------------------------------------- | ---------: | ---------: |
13 + | Enable duration | 0.002589 s | 264.708 s |
14 + | Database size after initialization and maintenance | 8.008 GB | 15.195 GB |
15 +
16 + ## Results
17 +
18 + All **11,640 measured operations** completed without errors. The tables pool
19 + three rounds. Lower latency and higher throughput are better. FTS p95 is the
20 + maximum of only 15 observations per backend/query; see the sampling caveat below.
21 +
22 + ### FTS5 versus PostgreSQL full-text search
23 +
24 + | Workload | SQLite median / p95 (ms) | PostgreSQL median / p95 (ms) | SQLite ops/s | PostgreSQL ops/s |
25 + | ------------------------------------ | -----------------------: | ---------------------------: | -----------: | ---------------: |
26 + | Common: `discussion` (~25% match) | 19,220.321 / 21,491.441 | 22,335.698 / 24,793.862 | 0.050 | 0.044 |
27 + | Medium: `deployment` (~1.09%) | 1,292.016 / 1,334.494 | 201.237 / 212.263 | 0.896 | 4.9 |
28 + | Rare: `quasar` (~0.01%) | 6.045 / 6.504 | 22.672 / 23.708 | 162.7 | 44.3 |
29 + | Prefix: `deplo` (~1.09%) | 1,293.404 / 1,304.671 | 201.635 / 203.410 | 0.898 | 5.0 |
30 + | AND: `deployment rollback` (~0.099%) | 59.042 / 59.787 | 36.978 / 38.430 | 16.9 | 27.0 |
31 + | `deployment` in channel 042 | 127.693 / 130.478 | 35.095 / 427.356 | 7.8 | 10.9 |
32 + | Missing: `absentlexemezzz` | 0.314 / 0.488 | 22.065 / 23.419 | 3,076.1 | 45.4 |
33 + | `quasar`, offset 100 | 6.302 / 7.276 | 22.605 / 24.119 | 157.6 | 44.4 |
34 +
35 +
36 + ### History and writes
37 +
38 + | Workload | SQLite median / p95 (ms) | PostgreSQL median / p95 (ms) | SQLite ops/s | PostgreSQL ops/s |
39 + | ------------------------------------ | -----------------------: | ---------------------------: | -----------: | ---------------: |
40 + | Latest 100 messages | 0.965 / 4.304 | 1.561 / 2.171 | 583.7 | 613.7 |
41 + | 100 messages halfway through history | 20.268 / 36.208 | 65.703 / 128.343 | 48.7 | 13.1 |
42 + | Latest 100, eight concurrent callers | 7.814 / 9.170 | 11.934 / 13.005 | 1,007.4 | 665.3 |
43 + | Insert one message | 0.520 / 2.503 | 9.327 / 10.075 | 699.0 | 114.9 |
44 + | Insert, eight concurrent callers | 4.612 / 44.283 | 74.908 / 87.154 | 712.5 | 109.2 |
45 +