[Dovecot] mail open slowly
Hello,
I have a dovecot IMAP server (relative small hardware: HP Microserver with 6 Gbyte RAM, linux soft RAID1 with 2x 7200 SATA disk) with 100 Gbyte maildirs.
Server works fine but sometimes I can open mails slowly (5-10 sec), typical with new mails.
It's intresting when I open an another old mail (with 0 sec wait), after new mail open quickly.
Is it dovecot mail indexes or I/O problem?
Load and CPU use is small typical 0.10, 10%, I see small IO wait.
Debian 6.0, Dovecot 1.2.15, fsync and nmap is disable
Best Regards,
Gabor
Am 27.10.2012 09:52, schrieb Bernics Gábor | Penta Unió Zrt.:
Hello,
I have a dovecot IMAP server (relative small hardware: HP Microserver with 6 Gbyte RAM, linux soft RAID1 with 2x 7200 SATA disk) with 100 Gbyte maildirs.
that seems ok
Server works fine but sometimes I can open mails slowly (5-10 sec), typical with new mails.
what mailbox type, how much mail in that mailbox how many concurent cons, imap or pop3 ?
It's intresting when I open an another old mail (with 0 sec wait), after new mail open quickly.
may client cached
Is it dovecot mail indexes or I/O problem?
perhaps this , perhaps other
Load and CPU use is small typical 0.10, 10%, I see small IO wait.
Debian 6.0, Dovecot 1.2.15, fsync and nmap is disable
show config and logs
Best Regards,
Gabor
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
Thank you
I use dovecot LDA (+sieve) with maildir.
conf:
logs:
connections:
"It's intresting when I open an another old mail (with 0 sec wait), after new mail open quickly.
may client cached"
it's possible.
2012-10-27 11:36 időpontban Robert Schetterer ezt írta:
Am 27.10.2012 09:52, schrieb Bernics Gábor | Penta Unió Zrt.:
Hello, I have a dovecot IMAP server (relative small hardware: HP Microserver with 6 Gbyte RAM, linux soft RAID1 with 2x 7200 SATA disk) with 100 Gbyte maildirs.
that seems ok
Server works fine but sometimes I can open mails slowly (5-10 sec), typical with new mails.
what mailbox type, how much mail in that mailbox how many concurent cons, imap or pop3 ? Is it dovecot mail indexes or I/O problem?
perhaps this , perhaps other
Am 27.10.2012 13:58, schrieb Bernics Gábor | Penta Unió Zrt.:
Thank you
I use dovecot LDA (+sieve) with maildir.
conf:
in general you should upgrade to 2.1.x with lmtp
for better performance use
auth cache
http://wiki.dovecot.org/Authentication/Caching an example you find in your config
logs:
i dont see imap here, do more verbose logging
connections:
to much info for this stage
how much traffic concurent in fail stage would be interesting
any chance measure iops of the storage ?
what mail client ?
if tb
do debug
http://wiki.dovecot.org/Debugging/Thunderbird
how much mail does this mailbox have
"It's intresting when I open an another old mail (with 0 sec wait), after new mail open quickly.
may client cached"
it's possible.
2012-10-27 11:36 időpontban Robert Schetterer ezt írta:
Am 27.10.2012 09:52, schrieb Bernics Gábor | Penta Unió Zrt.:
Hello, I have a dovecot IMAP server (relative small hardware: HP Microserver with 6 Gbyte RAM, linux soft RAID1 with 2x 7200 SATA disk) with 100 Gbyte maildirs.
that seems ok
Server works fine but sometimes I can open mails slowly (5-10 sec), typical with new mails.
what mailbox type, how much mail in that mailbox how many concurent cons, imap or pop3 ? Is it dovecot mail indexes or I/O problem?
perhaps this , perhaps other
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
On 10/27/2012 6:58 AM, Bernics Gábor | Penta Unió Zrt. wrote:
I use dovecot LDA (+sieve) with maildir.
conf:
Next time simply paste "dovecot -n" output into your email.
Assuming Dovecot is the only program accessing the maildirs, try:
maildir_very_dirty_syncs=yes
That may help some.
It may not have been a factor in this case, but note that when anyone is doing a full text search on a large mailbox on this hardware with maildir you will see latency, and it is unavoidable. Neither a single 7.2K SATA spindle nor md/RAID1 pair of them, has enough seek capacity to service all the sector requests in a timely fashion.
Also, I noticed you disabled fsync. This is a very very bad idea for a mail server. If you lose power, or suffer a kernel/hardware/etc crash, you lose the Linux buffer cache contents. Thus, you may lose emails that haven't been flushed to disk, and possibly get index file corruption if mmap'd pages haven't been flushed.
Running with fsync disabled is like having sex with a Bangkok prostitute without a condom while juggling chainsaws while driving drunk at 250kph at night without headlights.
fsync does hurt write performance to a degree, especially with maildir storage, but will likely be invisible on a small server with few users/light load. And it will prevent potentially severe problems with file corruption and/or lost emails.
-- Stan
Thanks a lot to everybody
First step I will upgrade to dovecot2.
I will write my experiences.
"Running with fsync disabled is like having sex with a Bangkok prostitute without a condom while juggling chainsaws while driving drunk at 250kph at night without headlights."
:-)
Gabor
2012-10-27 20:27 időpontban Stan Hoeppner ezt írta:
On 10/27/2012 6:58 AM, Bernics Gábor | Penta Unió Zrt. wrote:
I
use dovecot LDA (+sieve) with maildir. conf: http://pastebin.com/9fhYD58g [1]
Next time simply paste "dovecot
-n" output into your email.
Assuming Dovecot is the only program
accessing the maildirs, try:
maildir_very_dirty_syncs=yes
That
may help some.
It may not have been a factor in this case, but note
doing a full text search on a large mailbox on
maildir you will see latency, and it is unavoidable. Neither a single 7.2K SATA spindle nor md/RAID1 pair of
service all the sector requests in a timely fashion.
Also, I noticed you disabled fsync. This is a very very bad idea for a mail server. If you lose power, or suffer a kernel/hardware/etc crash, you lose the Linux buffer cache contents. Thus, you may lose emails that haven't been flushed to disk, and
that when anyone is this hardware with them, has enough seek capacity to possibly get index file
corruption if mmap'd pages haven't been flushed.
Running with fsync disabled is like having sex with a Bangkok prostitute without a condom while juggling chainsaws while driving drunk at 250kph at night without headlights.
fsync does hurt write performance to a degree, especially with maildir storage, but will likely be invisible on a small server with few users/light load. And it will prevent potentially severe problems with file corruption and/or lost emails.
Links:
participants (3)
-
Bernics Gábor | Penta Unió Zrt.
-
Robert Schetterer
-
Stan Hoeppner