Bug 276975 - Akonadi server should free memory more aggresively
Summary: Akonadi server should free memory more aggresively
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 1.5.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-02 22:13 UTC by S.Trzmiel
Modified: 2012-10-16 17:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S.Trzmiel 2011-07-02 22:13:56 UTC
Version:           1.5.3 (using KDE 4.6.4) 
OS:                Linux

Akonadi server tends to keep huge amounts of memory allocated after memory usage peak.

My pim setup consists two pop3 accounts, one imap account (200MB quota, less than 1000mails), personal contacts in local directory, local maildir, one KDE calendar resource.
Here, at logon akonadi_server takes 6-8MB of RAM, imap resource eats ~8MB, rest of the processes takes ~2-3MB each.
Typical usage increases numbers to 10-20MB for server and ~10MB for imap resource.
Performing any memory costly operation (apply some filters/rules to the whole mail dir ) bumps  memory usage rises to hundrets of MBs, sometimes akonadiserver process can use ~1GB of memory, imap resource takes ~100MBs, one of the agent launcher processes (i guess related to imap) uses +25MBs.

And here's the problem: when this operation is finished,  memory usage drops to 100-180MBs for akonadi_server (10 times more it normaly uses). Also agent_launcher process stays at +20MBs, which again is 10 times more it needs.

It doesn't matter if I close kmail or wait for all the processes to idle (once I left it running all night). The only way to free used memory is restart of akonadi server.


Reproducible: Always

Steps to Reproduce:
1. Set some email accounts (imap may reveal issue a bit faster as filtering local maildir usually doesn't need so much ram)
2. Run KMail and apply some filter to one of the inbox folders (imap one prefferably.
3. Watch memory usage increase.


Actual Results:  
Memory usage once bumped, stays high.

Expected Results:  
Memory usage returns to values comparable (no more than 2-3 times higher)  to values typical for normal usage.
Comment 1 Volker Krause 2012-03-11 15:21:07 UTC
What tool did you use to obtain these numbers?
Comment 2 S.Trzmiel 2012-03-12 22:57:30 UTC
Numbers were taken from ksysguard memory column. I think current release (1.7.1) does much better job here. I never managed to get the mem usage comparable to this bug report, although I've disabled most troublesome filters (spamassassin/clamav/spambayes).

I'll try to recheck it during this weekend.
Comment 3 S.Trzmiel 2012-10-16 17:40:13 UTC
Current mem usage figures seems to be reasonable (akonadi-1.8.0-1)
I think it's tiem to cloe this one.