hcache on tmpfs?
void
void at f-m.fm
Fri Mar 31 09:11:57 UTC 2023
Hello Cameron, I've replied in-line
On Fri, Mar 31, 2023 at 10:22:49AM +1100, Cameron Simpson wrote:
>"memory based" might just mean memory mapped - kytotocabinet still has
>persistent storage. Using a tmpfs will mean (a) it uses your physical
>RAM (or possibly swap?) even when you're not using mutt and (b) the db
>will vanosh on reboot.
>
>I've used kyotocabinet elsewhere but do not know much, if anything,
>about its internals.
>
>Are you asking about picking a db backend (eg kyoto versus dbm)?
yes. I have several choices when building mutt:
HCACHE_BDB : off
HCACHE_GDBM : off
HCACHE_KYOTOCABINET: off
HCACHE_LMDB : on
HCACHE_NONE : off
HCACHE_QDBM : off
HCACHE_TOKYOCABINET: off
The question is really about "is it worth putting kyotocabinet in there
when ~/tmp is already a tmpfs and it uses (mostly? mainly?) ram
>Subjectively, I'd have thought for moderate data they'd be similar on a
>tmpfs. If you're prepared to rebuild the whole hcache after a reboot
>(which of course might be very infrequent for you) it still may not
>matter.
Yes. The machine is on 24/7 apart from OS upgrades and similar
>Can you qualify what your concerns are here?
It's just interest. I want as fast as possible and it's not an issue if
headers have to be re-fetched after a boot because the connection is
also fast. I use imap with my ISP. I frequently press '$' to resync
last-read pointers with the imap server. Maybe I can tell mutt to do
that automatically every 5 mins. my concern is only that if/when headers
have to be re-fetched that already-read email doesn't have the unread
flag set subsequently.
>I use an hcache. On persistent storage, which is an SSD for me. My
>"python" folder has 157000 messages in it and opening mutt on it and
>then closing it just took about 20 seconds including eyeballing the top
>line to read the message count. This mutt was built with tokyocabinet,
>which I expect is used for the hache (nothing else would have any use
>for it).
I'd recomment lmdb in your context if you need persistent storage.
Have been v impressed with lmdb. I also have thousands of emails
spread across different folders. My context is using a rpi4b (8GB) with
usb3-connected hard drive. Right now, with $tmpdir pointing to a tmpfs
mount, and with hcache still pointing to the HD, (and with a zfs
filesystem), mutt is veru useable and quick even on this limited
hardware.
--
More information about the Mutt-users
mailing list