View previous topic :: View next topic |
Author |
Message |
haukew Tux's lil' helper
Joined: 01 Dec 2006 Posts: 135 Location: Hamburg - Germany
|
Posted: Wed Mar 28, 2007 2:29 pm Post subject: KMail very slow. Why? |
|
|
Hi!
Since i am using KDE i want to use KMail (because of the better Adressbook-Integration in KMobiletools, Kopete etc). I have been using it now for about three weeks, and i have realized that
- KMail ist very, very slow when i filter spam - it takes about 1-2 Seconds per E-Mail to be filtered, during this time (about 1 minute) i can't do anything with KMail. It just hangs. Thunderbird needed about 1-2 seconds for all my spam.
- The spamfilter i use (SpamAssassin) is not as good as the one in Thunderbird, which filtered almost every Spam-Mail out - SpamAssassin, after 2 weeks of training, filters 2-5 out of 20
- KMail is in general much slower than Thunderbird, opening dialogs like "send mail" takes about 1 second.
My computer is a 3500+ with 1 Gig RAM, so it can't be that.
How can i fix this? And which other Spamfilter is better and faster than SpamAssassin?
Many thanks in advance, hauke _________________ http://www.MySpace.com/TheAgeOfSound - my band |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Thu Mar 29, 2007 6:34 am Post subject: |
|
|
KMail isn't slow when you filter spam; SpamAssassin is slow. KMail is basically waiting for SA to finish processing each mail. What you should do is find a way to speed up SA. Are you using spamc/spamd instead of using "spamassassin"?
When I used SA, it caught about 99% of the spam I was getting, but as you noticed, it's slow. I switched to Bogofilter and have been happy with it. What you can try is to use Bogofilter first, and then SA for anything that slips through. You should also setup a whitelist so that all mails coming from known senders will skip the spam filtering. So something like this should help speed things up:
- check sender against whitelist
- if not in whitelist, run mail through Bogofilter
- if bogosity < threshold, run mail through SpamAssassin
_________________ Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside. |
|
Back to top |
|
|
haukew Tux's lil' helper
Joined: 01 Dec 2006 Posts: 135 Location: Hamburg - Germany
|
Posted: Fri Mar 30, 2007 2:57 pm Post subject: |
|
|
uhm, i emerged spamassassin and selected it in KMail, it is called "Spamassassin 3.x (Perl)" there. I also have "GMX Spam" but i deactivated (didn't select) it.
I will give bogofilter a try _________________ http://www.MySpace.com/TheAgeOfSound - my band |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Fri Mar 30, 2007 5:12 pm Post subject: |
|
|
of all the KDE programs I have used, kmail is probably the worst. I don't know how can anyone use it on daily basis. I don't have any filters or virus scans enabled, and going from one folder to another can take minutes sometimes (with the blue screen showing, "please wait"), when the same operation completes in under a second in thunderbird. I wanted better integration with the rest of kde too, but gave up on kmail after sometime. It was an utter waste of time.
PS: I did file a few bugs and nobody responded, and I decided to just chuck it. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Sat Mar 31, 2007 2:09 am Post subject: |
|
|
haukew wrote: | uhm, i emerged spamassassin and selected it in KMail, it is called "Spamassassin 3.x (Perl)" there. I also have "GMX Spam" but i deactivated (didn't select) it.
I will give bogofilter a try |
I have the "spamd" daemon running and the KMail "Anti Spam" wizard detects it. You probably only need to start it using "/etc/init.d/spamd start" to get it to work.
devsk: I find that really strange because KMail works perfectly for me and I find the GUI to be very responsive. At one point, switching folders was a little slow (about 1-2 seconds), but that was because I had 5000+ emails in my inbox. I created an archive folder and put everything older than 3 months in it. I have no problem whatsoever with KMail. _________________ Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sat Mar 31, 2007 3:27 pm Post subject: |
|
|
nahpets wrote: | devsk: I find that really strange because KMail works perfectly for me and I find the GUI to be very responsive. At one point, switching folders was a little slow (about 1-2 seconds), but that was because I had 5000+ emails in my inbox. | that may be it. I have like 9000 mails in my inbox and about 4-5k in other 32 folders. But the thing is that thunderbird doesn't mind traversing these in sub-second time. This is my work account and I would hate to go another archive folder (which will be large and slow) to access a six month old email. So, I will wait for the next release and see if the bugs are fixed. |
|
Back to top |
|
|
Carlo Developer
Joined: 12 Aug 2002 Posts: 3356
|
Posted: Sat Mar 31, 2007 6:21 pm Post subject: |
|
|
hukew: Calling the perl script for every single email, instead using spamd/spamc, is of course incredible slow.
devsk: I run KMail just fine with about 160.000 emails atm. using pop3 accounts. Are that imap accounts you've had the problems with? _________________ Please make sure that you have searched for an answer to a question after reading all the relevant docs. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sat Mar 31, 2007 6:34 pm Post subject: |
|
|
Carlo wrote: | Are that imap accounts you've had the problems with? | ack on that. Is there something specific to IMAP that causes the slowdown? |
|
Back to top |
|
|
Carlo Developer
Joined: 12 Aug 2002 Posts: 3356
|
Posted: Sat Mar 31, 2007 7:37 pm Post subject: |
|
|
Well, KMail's imap code can only get better... _________________ Please make sure that you have searched for an answer to a question after reading all the relevant docs. |
|
Back to top |
|
|
loki_val Retired Dev
Joined: 13 Nov 2006 Posts: 418 Location: Denmark
|
Posted: Sat Mar 31, 2007 9:42 pm Post subject: |
|
|
If it's imap you're having trouble with, you will like 3.5.7 - lots of fixes have been introduced. See bug171346 for some patches I have backported for 3.5.6. I can now actually read LKML without Kmail crashing. In fact, since applying these and a few other tweaks, Kmail has been working without crashes and rather fast. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sun Apr 01, 2007 12:10 am Post subject: |
|
|
peteralf wrote: | If it's imap you're having trouble with, you will like 3.5.7 | is 3.5.7 coming out sometime soon? |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Sun Apr 01, 2007 5:29 am Post subject: |
|
|
devsk wrote: | nahpets wrote: | devsk: I find that really strange because KMail works perfectly for me and I find the GUI to be very responsive. At one point, switching folders was a little slow (about 1-2 seconds), but that was because I had 5000+ emails in my inbox. | that may be it. I have like 9000 mails in my inbox and about 4-5k in other 32 folders. But the thing is that thunderbird doesn't mind traversing these in sub-second time. This is my work account and I would hate to go another archive folder (which will be large and slow) to access a six month old email. So, I will wait for the next release and see if the bugs are fixed. |
It may also depend on what format your mail is stored in. In KMail,. you're probably using "maildir", which is basically 1 file for every email. So you can see that if you have a directory (inbox) with 9000+ emails, it will take a second to read through them. It also takes Mutt some amount of time to list large mailboxes too, so I would guess that this is just a delay caused by the filesystem and not some sort of bug. As far as I know, Thunderbird stores emails in a single large file which is probably optimized for speed. _________________ Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside. |
|
Back to top |
|
|
loki_val Retired Dev
Joined: 13 Nov 2006 Posts: 418 Location: Denmark
|
Posted: Sun Apr 01, 2007 8:00 pm Post subject: |
|
|
devsk wrote: | peteralf wrote: | If it's imap you're having trouble with, you will like 3.5.7 | is 3.5.7 coming out sometime soon? | IIRC, May/June was mentioned as the target release date. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sun Apr 01, 2007 8:07 pm Post subject: |
|
|
nahpets wrote: | In KMail,. you're probably using "maildir", which is basically 1 file for every email. | Is that the default format because I don't have kmail installed anymore (I got so frustrated, I uninstalled it)? kmailrc tells me "default-mailbox-format=1". Does that mean I am using "maildir"? nahpets wrote: | So you can see that if you have a directory (inbox) with 9000+ emails, it will take a second to read through them. It also takes Mutt some amount of time to list large mailboxes too, so I would guess that this is just a delay caused by the filesystem and not some sort of bug. As far as I know, Thunderbird stores emails in a single large file which is probably optimized for speed. | Now, I am using the best FS out there for handling small files (i.e. reiser4), so it surprises me. It works for those 170,000 small files in portage, so it should work for 9000 files, even if that is what is bogging it down.
There is a 6 meg INBOX file (ascii) and a 4 meg .INBOX.index (binary) file and other binary files in ~/.kde/share/apps/kmail/imap/.XXXXXXXXXX.directory. What are these files? ~/.kde/share/apps/kmail/imap/.XXXXXXXXXX.directory/.INBOX.directory is empty. I am thinking may be there is some sort of bad index management might be happening here. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Mon Apr 02, 2007 2:25 am Post subject: |
|
|
Quote: | Is that the default format because I don't have kmail installed anymore |
"maildir" is the default format used by kmail. Many people prefer the "1 file = 1 mail" format over having a single large binary blob. Consider what happens if your single large file gets corrupted somehow. You can lose all your mail if this happens. On the other hand, the chances that all 9000 individual files in your maildir get corrupted is small.
Quote: | Now, I am using the best FS out there for handling small files (i.e. reiser4), so it surprises me. It works for those 170,000 small files in portage, so it should work for 9000 files, even if that is what is bogging it down. |
Consider what KMail does when it needs to refresh the display of your inbox. It needs to scan through all 9000 files and parse the From, Subject, etc fields and then display them in the GUI. Even if your filesystem is blazing fast, the whole process can take some time. You'll see this kind of thing happen with any program that has to do a lot of file IO. Ever opened a large spreadsheet in Excel?
To address your comment about portage, I would say that this isn't a fair comparison. Portage isn't interacting with a GUI like KMail is. Also, *is* portage really that fast? How long does it take to do "emerge -av world"? There has been a lot of discussion about Portage being slow because of Python, but from what I understand, the major slowdown is due to file io. _________________ Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Apr 02, 2007 2:48 am Post subject: |
|
|
nahpets wrote: |
To address your comment about portage, I would say that this isn't a fair comparison. Portage isn't interacting with a GUI like KMail is. Also, *is* portage really that fast? How long does it take to do "emerge -av world"? |
Code: |
real 0m6.318s
user 0m4.429s
sys 0m0.802s |
I have over 1000 pkgs installed. kmail can take minutes for switching between folders. I don't think its file io in case of kmail. |
|
Back to top |
|
|
astor84 Tux's lil' helper
Joined: 06 Feb 2007 Posts: 96 Location: Dallas, Tx
|
Posted: Mon Apr 02, 2007 3:11 am Post subject: |
|
|
peteralf wrote: | If it's imap you're having trouble with, you will like 3.5.7 - lots of fixes have been introduced. See bug171346 for some patches I have backported for 3.5.6. I can now actually read LKML without Kmail crashing. In fact, since applying these and a few other tweaks, Kmail has been working without crashes and rather fast. |
My main problem with kmail (though I use it every day) is that it's very particular about being left alone when you start up in an IMAP folder. If you accidentally click another IMAP folder before it finishes collecting it's metadata or w/e, it gets all pissed off and refuses to ever show anything until you restart it.
Is this fixed in > 3.5.5? |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Mon Apr 02, 2007 3:23 am Post subject: |
|
|
Quote: |
kmail can take minutes for switching between folders. I don't think its file io in case of kmail.
|
That's what I said. There's also the fact that KMail needs to update the GUI etc. Still though, several minutes sounds strange. Although I would tend to think that the problem is related more to IMAP (you said that's what you were using earlier) than anything else. I have an inbox with 5000 mails in it and it only takes about 1-2 seconds to refresh. _________________ Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside. |
|
Back to top |
|
|
haukew Tux's lil' helper
Joined: 01 Dec 2006 Posts: 135 Location: Hamburg - Germany
|
Posted: Tue Apr 03, 2007 1:35 pm Post subject: |
|
|
I just love this forum! Together with the awesome handbook it makes gentoo the very best distro, even for noobs like me.
Thank you all for your help, i selected "Spam Assassin (Daemon) now as my spam-filter. _________________ http://www.MySpace.com/TheAgeOfSound - my band |
|
Back to top |
|
|
mimosinnet l33t
Joined: 10 Aug 2006 Posts: 713 Location: Barcelona, Spain
|
Posted: Thu Aug 23, 2007 5:43 pm Post subject: |
|
|
devsk wrote: | Carlo wrote: | Are that imap accounts you've had the problems with? | ack on that. Is there something specific to IMAP that causes the slowdown? |
I use Kmail without any issues. Nevertheless, with IMAP accounts, kmail seems to connect to the server and re-read the server IMAP folders, being quite time-consuming. To avoid this, I have configured the IMAP folders as "disconnected IMAP" (or the English equivalent).
Cheers! |
|
Back to top |
|
|
z_sfeng Apprentice
Joined: 21 Apr 2004 Posts: 154 Location: Finland
|
Posted: Thu Nov 08, 2007 1:13 pm Post subject: |
|
|
Kmail IS SLOW here with IMAP. very often just listing folder forever, and I have to restart kmail.
So I switched to thunderbird.
maybe I should try the disconnected imap. But forgive me, I couldn't figure out how to configure the "disconnceted IMAP". I see nothing related in "setting" or in folder property. |
|
Back to top |
|
|
z_sfeng Apprentice
Joined: 21 Apr 2004 Posts: 154 Location: Finland
|
Posted: Thu Nov 08, 2007 1:29 pm Post subject: |
|
|
Sorry. After a simple search. I found the howto... somebody already asked same silly quesiton |
|
Back to top |
|
|
jstead1 Guru
Joined: 01 Aug 2003 Posts: 427 Location: Oswego, NY where the snow is deep
|
Posted: Thu Nov 08, 2007 11:54 pm Post subject: |
|
|
I have always found spamassassin to be very powerful (it is incredibly customizable, and there are tons of rule sets out there).
I have also found it to be fairly slow. It seems much better suited to use on a mail server, where it is getting all the mail, processing it, and then storing it. That way, you are not waiting for spamassassin when you open your client, because it is working 24/7, and it is not bogging down your machine, because it is running on a very powerful mail server.
But that's not what you have, and that's not what I have, so I used bogofilter when I used kmail.
If you are using a pop server, kmail has the ability to screen mail based on headers, saving the download. You can also screen out lots of mail, simply based on rules before the mail gets to the rule implementing the spam filter.
As an example, you can have a pop filter to screen out anything with viagra in the subject (I know, they don't do that anymore) and delete it directly on the server. I used a regular expression to screen out any mail with more than 3 @myparticulardomain.rr.com in any address field because a lot of spammers would send mail to 5 or 6 names in the domain, and I only knew 3. With the custom rulesets to reduce the load on bogofilter, kmail actually was a good bit faster than thunderbird for me, but my main e-mail account was on a pop server.
I use thunderbird now, because it can integrate with google calendar and gmail very well. But kmail has some very unique features, I hate to see people dissing it so bad. _________________ jim |
|
Back to top |
|
|
mimosinnet l33t
Joined: 10 Aug 2006 Posts: 713 Location: Barcelona, Spain
|
Posted: Sun Nov 11, 2007 9:25 pm Post subject: |
|
|
jstead1 wrote: | I have always found spamassassin to be very powerful (it is incredibly customizable, and there are tons of rule sets out there).
I have also found it to be fairly slow. It seems much better suited to use on a mail server, where it is getting all the mail, processing it, and then storing it. That way, you are not waiting for spamassassin when you open your client, because it is working 24/7, and it is not bogging down your machine, because it is running on a very powerful mail server. |
I have been able to adress this issue with fetchmail -> procmail (filtering mail with spamassassin and ClamAV-> dovecot (having an IMAP server) -> kmail (reading the mail from the server). I followed one of the guides in the gentoo wiki.
It is true that has been a bit of work. Nevertheless, now that it is working:
* I get all my mail from differents accounts with fechmail.
* Procmail has a very efficient and flexible way to filter mail (with procmail and clamav).
* Dovecot gives me an IMAP server, so I can read the mail in my home computer from anywhere.
* Kmail does not has to wait for spamassassin when reading mail.
Thinking about it, it all started with kmail being very slow with spamassassin .
Cheers! |
|
Back to top |
|
|
Toomuch n00b
Joined: 16 Mar 2004 Posts: 49
|
Posted: Mon Nov 12, 2007 12:15 pm Post subject: |
|
|
Bogofilter has worked perfectly for me. Must have been months since one single spam has slipped through.
With IMAP KMail is still (3.5.7) frustrating as it likes to copy newest mails back and forth several times. If someone sends a large attachment this can take very long time.
t |
|
Back to top |
|
|
|