06 Aug 2009

05Aug09

Dear evolution, Why are you taking 180 seconds (+- 20) to open mails ?

Dear user, I’m reading message metadata for every message in that folder, then for all the new mail that arrived while I was doing that.

Dear evolution, sqlite is good, not reading the entire maildirs in to filter mail, or open a folder, would be better.

iotop says:
   TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO> COMMAND
 14797 be/4 robertc     4.30 M/s    0.00 B/s  0.00 %  0.00 % evolution

Dear user, I know, but I’m still the program I was before sqlite… what to do? (bugs have been filed, tuits are currently lacking).

Dear evolution, I see you have a large db, but perhaps its just your cache size?

$ ls -l /home/robertc/.evolution/mail/imap/robertc@localhost/folders.db
-rw-r--r-- 1 robertc robertc 953131008 2009-08-06 12:23 /home/robertc/.evolution/mail/imap/robertc@localhost/folders.db
$ sqlite3 /home/robertc/.evolution/mail/imap/robertc@localhost/folders.db
SQLite version 3.6.14.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma default_cache_size
2000
sqlite> pragma default_cache_size=50000

Dear user, oooo, that feels good.
2000 – the default, is 2MB of cache. evolution was using 535m of actual memory before, this gives it 25 times the cache size. My theory is that the still present read-all-message-info limitations in evolution were causing cache thrashing. (A DB doesn’t help at all unless one actually is looking at less data :).

About these ads


5 Responses to “06 Aug 2009”

  1. 1 hggdh

    Hey, thank you… I am getting this upstream, and let’s see what happens ;-)

  2. 2 rbtcollins

    Cool :). The fundamental problem is the up front query of message metadata for all messages:- thats what drives disk IO & db access for evolution when it opens a folder (and is not needed in principle: tinymail & thunderbird don’t do this).

  3. 3 hggdh

    I opened https://bugzilla.gnome.org/show_bug.cgi?id=595389 about this. I expect this will take a while to be fully digested, though.

    Again, thank you, Robert.

  4. 4 rbtcollins

    NB: evolution now forces a small cache size, see the bug that hggdh linked for details: you need to set an environment variable to change the cache size now, rather than changing the default in the database.

  5. 5 rbtcollins

    Oh foo, I ned to read the whole way through: 2.28 restores using the cache size configured in the sqlite DB, so it is tunable :).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 1,056 other followers

%d bloggers like this: