Hi Christoph.
On 5/5/19 2:05 PM, Christoph wrote:
how big should the cache filesystem (tmpfs) be
relative to the cache.size?
If cache.size is N MB
is N + 50 MB a fine value?
I'm asking because apparently 50 MB
additional space is not enough: [...]
I can't see what's wrong there yet. For me LMDB used by kresd allocates
`data.mdb` file of exactly the chosen size and `lock.mdb` of 8 MiB. The
implementation is basically just calling mdb_env_set_mapsize() [1]
[1]
http://www.lmdb.tech/doc/group__mdb.html#gaa2506ec8dab3d969b0e609cd82e619e5
It's possible tmpfs has some overhead, so 50 MiB might be a too small
margin for the mount size if the size is e.g. in gigabytes. In any
case, tmpfs is supposed to only consume memory used by files inside, so
mounting with larger size should be for free, except for giving up a
kernel-level upper bound on size.
If cache.size does not set a maximum size maybe remove
"Set the cache
maximum size in bytes." from its documentation? :)
I believe it works, but perhaps you can send more details so we can
reproduce it, assuming the deviation is significant. Before that you'd
best check what `ls -l` reports on the files. I think there are some
minor caveats, some mentioned in [1] - IIRC low limit of 10 MiB,
rounding to 4 KiB, truncation sometimes impossible because it never
moves written data.
--Vladimir