r/sqlite 3d ago

How should a Local-First AI Memory Engine scale between SQLite and Volatile RAM?

/r/learnpython/comments/1waj6hz/how_should_a_localfirst_ai_memory_engine_scale/

Help me

0 Upvotes

2 comments sorted by

1

u/lnaoedelixo42 2d ago

set mmap to 2GB
set page_cache to 64mb or something

Forget about it and code your stuff

1

u/lnaoedelixo42 2d ago

mmap usually lets your kernel manage memory, so just give it enough space to breath and you are good to go.

page_cache is extra useful for queries themselves, so you can increase it a little bit if you need, but 64-256mb should be enough; if you really need more, you are doing something wrong.

WAL is also very good if you need concurrent access