[MlMt] Memory usage
philip at trouble.is
Wed May 12 01:31:25 EDT 2021
On 2021-05-11 15:10:32 (+0800), Patrik Fältström via mailmate wrote:
> I have been looking at the memory usage of mailmate throughout the
> years. I have concluded it "uses lots of memory".
> I have four imap accounts where specifically one have lots of
> messages. In total I have 2.988.939 messages, and MailMate eats
> 4.34GByte of memory about half an hour after starting.
> I tested for the first time Mail Mate on a MacMini with 8G RAM, and
> after adding the accounts it was up to 8.5G of RAM. As I know MailMate
> eats lot when booting a new machine (leak somewhere), I restarted it
> and it is about 3.34GB directly after launch.
> A bit too much on a host with 8G...so I do not think I will swap
> hardware just yet.
> Question, have anyone of you like myself had issues with memory and
> looked into what might causing it?
> Any strategies for using less memory? [too many virtual mailboxes]
I'm a little behind you with "only" 2,451,756 messages and MailMate is
unsurprisingly the biggest memory user on my computer too ... by a
significant margin. The next process down is iTerm2 at 334.8M[*].
On my aarch64 Mac Mini with 16G memory, MailMate goes to 3.06G memory
immediately after starting. On my MacBook Pro x86_64 laptop, it uses
about 4.05G. I believe the configurations are mostly identical since I
copied the Application Support directory from the laptop to the Mac Mini
when I bought it and I can't remember making any changes on either
In the steady state, after about half a day of reading and typing email,
MailMate sits around 4GB on my laptop (x86_64) and around 3.3G on my Mac
Previous discussions on this mailing list suggested virtual mailboxes
contribute a lot to the memory footprint. More recently (September
2020), Benny also mentioned something about caching message views.
I do all of my filtering with sieve server-side and only have a handful
of virtual mailboxes. I wonder if the number of messages that a virtual
mailbox matches contributes something to the memory footprint. You
mention elsethread that you have a "all mail in the past six months"
virtual mailbox and use it as your default search target. Could it be
that MailMate keeps the index of that virtual mailbox in memory? That
may be something worth poking at.
[*] I never paid attention to the memory usage of iTerm2. That's rather
alarming. That's three times as much memory as Safari needs for a
DuckDuckGo query about iTerm2's memory use!
Senior Reality Engineer
More information about the mailmate