You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lists (300 elements, LPUSH/LTRIM churn): 2.3x Redis data memory, RSS grows to 3.7x (Misskey timelines) #844
On Misskey's home-timeline workload (Redis lists, LPUSH per follower, LTRIM on 10% of pushes, whole-list LRANGE reads), KiviDB 1.2.2 is faster than Redis 8.10 (1.2–1.4× ops/s, ~30% lower median latency) but uses far more memory:
2.3× the data memory for the same lists: used_memory 278 Mi
9463
B vs 119 MiB for 20,000 lists × 300 sixteen-byte members.
RSS grows to 3.7× Redis under churn: after ~2 minutes of LPUSH/LTRIM, RSS is 1.24 GiB vs Redis's 0.33 GiB (from 375 MiB vs 128 MiB after the load).
Lists of this length are above the sizes in #297 (10 elements), but Redis's quicklist-of-listpacks stays compact at any length, so the gap persists. The RSS growth under push/trim churn looks like allocator retention (#240?) rather than live data. For Misskey, whose timeline Redis is a separate instance sized by memory, this outweighs the throughput gain.
Tail latency is also worse at low concurrency: p99.9 4.4 ms vs 0.78 ms at 48 connections.
Numbers (two runs per server, each started fresh, same 8-vCPU host)
Redis 8.10.3
KiviDB 1.2.2
used_memory after load
119 MiB
278 MiB
RSS after load
128 MiB
375 MiB
RSS after the runs below
0.33 GiB
1.24 GiB
ops/s, 48 conns
116k
140k
ops/s, 200 conns
107k
150k
ops/s, 500 conns
105k
142k
ops/s, 200 conns, pipeline 16
160k
194k
median / p99 / p99.9, 48 conns
0.40 / 0.65 / 0.78 ms
0.30 / 0.73 / 4.40 ms
median / p99, 500 conns
4.65 / 7.9 ms
3.31 / 8.2 ms
Repro
Load (redis-py): for f in 1..20000: RPUSH list:homeTimeline:u{f} 300 random 16-char [0-9a-z] ids.
Lists are now kept in chunks (#895, on master): for lists of this shape the data memory is about half of what is reported here (32-byte elements: 65.2 → 38.4 bytes an element at 100 elements, 36.7 at 3 million, against Redis's 36.4 and 34.3), and a capped list gives its buffers back after LTRIM. Two things in this issue were not re-measured and keep it open: RSS after two minutes of LPUSH/LTRIM churn (allocator retention), and p99.9 at 48 connections. To do: rerun the Misskey mix on master and record all four rows.
Re-measured with this issue's load and memtier mix on one Azure D4s_v5 (master b75b064 default release build, Redis 8.10.2 and 1.2.2 on the same VM, server on 2 vCPUs, client on the other 2). Lists are stored in chunks since #895.
master
Redis 8.10.2
1.2.2
used_memory after load
124 MiB
119
279
RSS after load
141 MiB
133
384
used_memory after ~2 min of LPUSH/LTRIM
236 MiB
215
629
RSS after the churn
315 MiB
255
859
RSS 15 s after the load stops
263 MiB
250
859
At 48 connections p99.9 was 4.32 ms (Redis 5.18). On this 4-vCPU box the client was the limit, so throughput was level (about 76-80k ops/s for all three) and the latency row is weak evidence: 1.2.2 did not show the tail gap here either. Closing on the memory rows; reopen if a larger box shows the tail gap again.
Activity
murtazayusuf commentedon Nov 17, 2026
Lists are now kept in chunks (#895, on master): for lists of this shape the data memory is about half of what is reported here (32-byte elements: 65.2 → 38.4 bytes an element at 100 elements, 36.7 at 3 million, against Redis's 36.4 and 34.3), and a capped list gives its buffers back after
LTRIM. Two things in this issue were not re-measured and keep it open: RSS after two minutes ofLPUSH/LTRIMchurn (allocator retention), and p99.9 at 48 connections. To do: rerun the Misskey mix on master and record all four rows.murtazayusuf commentedon Nov 18, 2026
Re-measured with this issue's load and memtier mix on one Azure D4s_v5 (master b75b064 default release build, Redis 8.10.2 and 1.2.2 on the same VM, server on 2 vCPUs, client on the other 2). Lists are stored in chunks since #895.
used_memoryafter loadused_memoryafter ~2 min ofLPUSH/LTRIMAt 48 connections p99.9 was 4.32 ms (Redis 5.18). On this 4-vCPU box the client was the limit, so throughput was level (about 76-80k ops/s for all three) and the latency row is weak evidence: 1.2.2 did not show the tail gap here either. Closing on the memory rows; reopen if a larger box shows the tail gap again.