[Kde-pim] Akonadi: single database design mistake?

Dmitry Torokhov dmitry.torokhov at gmail.com
Tue Nov 29 22:09:19 GMT 2011


On Tue, Nov 29, 2011 at 10:19:01PM +0100, Milian Wolff wrote:
> On Tuesday 29 November 2011 12:55:21 Dmitry Torokhov wrote:
> 
> <snip>
> 
> > > > Alas I still see akonadi/mysql peg my CPU ifor a while
> > > > 
> > > > every time I switch mailboxes:
> > > >  1754 dtor      20   0 1175m  37m 4108 S 62.7  1.0  10:22.35 mysqld
> > > >  3375 dtor      20   0  909m 159m  22m R 61.4  4.0   8:21.99
> > > > 
> > > > akonadi_imap_re
> > > > 
> > > >  1751 dtor      20   0 1363m  20m 5016 S  6.9  0.5   8:59.32
> > > > 
> > > > akonadiserver
> > > 
> > > Well, for me mysqld hardly shows up in the top 10 or even more list of
> > > most
> > > CPU intensive apps, and if it does for seconds, it is below 10%.
> > 
> > Would you mind staring sizes of your mailboxes and the rowcount on your
> > akonadi database? And what is your box? For the record I am reading my
> > mail from a Core2Duo laptop with 4Gb RAM and a mid-size SSD with TRIM
> > support. Up until now it was more than adequate (the real work is done
> > on headless workstations; mail is on dedicated servers).
> 
> <snip>
> milian at minime:~/.local/share/akonadi$ du -hs *
> 8.0K    akonadi_control.error
> 8.0K    akonadi_control.error.old
> 476M    db_data
> 4.0K    db_misc
> 1.6G    file_db_data
> 36K     file_lost+found
> 4.0K    mysql.conf
> 0       socket-minime
> 
> Note how the database is only <500MB. Since I use dimap, it is of course no 
> wonder that the bodies of the emails show up there as well (the 1.6GB).
> 
> Here you can find my data base internals:
> http://paste.kde.org/152840/

Thanks, and what kind of box you have, if you don't mind?

OK, So your parrtable is 241162 rows. Mine is twice as big:

| parttable | InnoDB |   10 | Compact  | 429789 | 930 |   400015360 ...

and that corresponds to 239231 distinct items, as far as I can tell:

mysql> SELECT COUNT(DISTINCT pimItemId) FROM parttable;
+---------------------------+
| COUNT(DISTINCT pimItemId) |
+---------------------------+
|                    239231 |
+---------------------------+
1 row in set (1.25 sec)

What about yours? Judgind by the size of pimitemflagrelation/
pimitemtable I'd say less than 70K, right?

Hmm, raw queries to mysql seem to be OK, so maybe it is akonadi/kmail
communication that is at fault here. I'll try gathering some profile
data when I get a chance.

Thanks.

-- 
Dmitry
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list