that would make it slower for no gain, what would be the point ?

Reply to this note

Please Login to reply.

Discussion

flexibility is sometimes as important as speed.

Thatโ€™s what she said ๐Ÿ˜

some user devices may not have GBs of memory for lmdb to do its thing

i think you completely missed the point of my post. page cache is not โ€œusingโ€ memory when it can be immediately evicted by apps allocating memory for real.

nostrdb effectively uses 0 memory since it is non-copy when querying. Nothing is copied into main memory, its just the page cache which the OS manages and is evictable, unlike explicitly allocated memory by processes.

The problem is that the OS reports this as resident set usage of the process, mixed in with other non-reclaimable memory usage, so itโ€™s very misleading.

If your system started swapping you would see nostrdb memory usage go to 0

ack thanks for the explainer