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
Self-hosted supermemory-server holds the entire corpus in RAM, so resident memory scales with total corpus size rather than working set. On a 16 GB host with only ~5,000 memories (~2 GB on-disk store), RSS sits at 7 GB baseline and ratchets to ~11 GB under ingest, wedging the process. Please consider a disk-backed / on-demand storage option so memory scales with the working set, not the whole database.
Evidence
/proc/<pid>/smaps on a running server: RSS is ~99% anonymous; the single largest anonymous region tracks the on-disk store size (~2 GB), and the data file is not mmap'd at all (file-backed mappings total <100 MB: the binary + libonnxruntime.so).
RSS only grows and never returns to the OS — it stays at the post-ingest peak until a full process restart.
The self-hosting docs confirm this is by design: "the built-in local embeddings and storage engine have a fixed footprint that exists before any document is processed."
Root cause
The storage engine is pglite (Postgres compiled to WASM) in its default memFS mode, which keeps the whole database — table data plus the pgvector/HNSW index — in WASM linear memory: decrypted, resident, and non-shrinking (WASM linear memory never releases pages back to the OS). Relevant upstream pglite issues:
A disk-backed / on-demand VFS option for self-host (or expose the pglite dataDir/VFS + shared_buffers/work_memstartParams) so RSS scales with the working set instead of the full corpus. Today the only storage-related env is SUPERMEMORY_DATA_DIR (location of the persisted copy), with no way to bound the in-memory footprint.
SUPERMEMORY_EMBEDDING_RAM_LIMIT caps ingest headroom but not the corpus baseline, so a self-hosted deployment currently needs RAM ≥ (full corpus + index) + ingest headroom, which does not scale for memory-heavy single-tenant use cases. A disk-backed option would make the resident footprint bounded and predictable.
Summary
Self-hosted
supermemory-serverholds the entire corpus in RAM, so resident memory scales with total corpus size rather than working set. On a 16 GB host with only ~5,000 memories (~2 GB on-disk store), RSS sits at 7 GB baseline and ratchets to ~11 GB under ingest, wedging the process. Please consider a disk-backed / on-demand storage option so memory scales with the working set, not the whole database.Evidence
/proc/<pid>/smapson a running server: RSS is ~99% anonymous; the single largest anonymous region tracks the on-disk store size (~2 GB), and the data file is not mmap'd at all (file-backed mappings total <100 MB: the binary +libonnxruntime.so).Root cause
The storage engine is pglite (Postgres compiled to WASM) in its default
memFSmode, which keeps the whole database — table data plus the pgvector/HNSW index — in WASM linear memory: decrypted, resident, and non-shrinking (WASM linear memory never releases pages back to the OS). Relevant upstream pglite issues:Requests
dataDir/VFS +shared_buffers/work_memstartParams) so RSS scales with the working set instead of the full corpus. Today the only storage-related env isSUPERMEMORY_DATA_DIR(location of the persisted copy), with no way to bound the in-memory footprint.Impact
SUPERMEMORY_EMBEDDING_RAM_LIMITcaps ingest headroom but not the corpus baseline, so a self-hosted deployment currently needs RAM ≥ (full corpus + index) + ingest headroom, which does not scale for memory-heavy single-tenant use cases. A disk-backed option would make the resident footprint bounded and predictable.Environment
supermemory-serverlinux-x64 standalone binary, versionserver-v0.0.3(pinned; can't move to 0.0.5+ due to Self-hosted v0.0.5 upgrade skips profile_buckets migration; /v4/profile returns 500 #1293)Xenova/bge-base-en-v1.5)