Re: sudden performance drop - i/o related
On 11.05.2021 07:30, Aki Tuomi wrote: On 11/05/2021 01:07 Marcin Gryszkalis wrote: It looks like i/o risen from 150writes/s to 500writes/s (in top hours) - One thing that does come to mind is that you are delivering outside dovecot. Without knowing your system better, I would suggest that one thing to try would be to use dovecot-lda to deliver mail. exim delivers locally via /usr/local/libexec/dovecot/dovecot-lda and it's the only way used for delivery (not counting occasional restoring mail from backups) Are your users directly accessing the maildir? Not sure what you mean, they use imap (plus few dovecot/pop3 boxes for automated processing). best regards -- Marcin Gryszkalis, PGP 0xA5DBEEC7 http://fork.pl/gpg.txt
sudden performance drop - i/o related
Hi I have exim/dovecot server that worked great for last few years and two weeks ago it got ill ;) First were users reporting errors on saving mails to Sent (timeouts). Now the logs are infested with warnings about long waits: May 10 10:18: Maildir /mail/xxx Synchronization took 193 seconds (1 new msgs, 0 flag change attempts, 0 expunge attempts) May 10 10:18: Maildir /mail/xxx Synchronization took 125 seconds (1 new msgs, 0 flag change attempts, 0 expunge attempts) May 10 10:18: Maildir /mail/xxx Synchronization took 211 seconds (1 new msgs, 0 flag change attempts, 0 expunge attempts) May 10 10:18: Maildir /mail/xxx Synchronization took 107 seconds (8 new msgs, 0 flag change attempts, 0 expunge attempts) May 10 10:18: Transaction log file /mail/xxx was locked for 36 seconds (Mailbox was synchronized) May 10 10:18: Transaction log file /mail/xxx was locked for 160 seconds (Mailbox was synchronized) May 10 10:18: Transaction log file /mail/xxx was locked for 72 seconds (Mailbox was synchronized) May 10 10:18: Locking transaction log file /mail/xxx took 60 seconds (syncing) May 10 10:18: Locking transaction log file /mail/xxx took 38 seconds (syncing) May 10 10:18: Locking transaction log file /mail/xxx took 35 seconds (syncing) It looks like i/o risen from 150writes/s to 500writes/s (in top hours) - but there's no real change in number of emails or the volume. Number of users is steady (~100 active users, ~250 imap sessions), number of emails (by count or by volume) is rising and falling within 15% margin. The box is FreeBSD 11.4, dovecot is 2.3.13. Filesystem is ZFS, disks are fine, free space is around 20% (~200GB) Layout is Maildir. CPU is not overloaded (2x6core), same with memory (48GB). I didn't change anything in configuration. Tonight I did some finetuning like maildir_copy_with_hardlinks=yes or mail_fsync=never/optimized (I'm not happy with that but I'm afraid it won't really help and I'll be able to revert that). I'm also thinking about switching from Maildir to sdbox (I know it won't hurt). I don't know where to look to find where the i/o goes. I don't have any metrics/stats enabled (I looked at the docs but it looks it's not really simple and needs some digging to get valuable config). Maybe somebody has suggestions what to look for? For detailed per-process stats I need to rebuild kernel with dtrace (other night I guess)... Simple top (in i/o mode - similar to linux's iotop) doesn't catch short living processes (like LDA deliveries). best regards -- Marcin Gryszkalis, PGP 0xA5DBEEC7 http://fork.pl/gpg.txt
Re: [Dovecot] Possible to log IMAP connections to MySQL Table?
On Wednesday of December 24 2008, Corey Shaw wrote: I'll take a look at the post login scripting. It sounds like it would be much better than a script that simply tails the log file for any IMAP connections. Thanks for the help! I used such script and it works fine (on not really busy site though): I think you could use better way to find out if it's imap or pop3 (better than looking if $ENV{POP3_CLIENT_WORKAROUNDS} exists), but it works for me... #!/usr/bin/perl use DBI; $db_user = 'dovecot'; $db_pass = 'DOVECOTPASSWORD'; $db_db = 'system'; $mode = exists $ENV{POP3_CLIENT_WORKAROUNDS} ? pop3 : imap; $ip = $ENV{IP}; $u = $ENV{USER}; $virtual = $u =~ m/(.*)\@(.*)/ ? 1 : 0; if ($virtual) { $local = $1; $domain = $2; $dbh = DBI-connect(DBI:mysql:$db_db, $db_user, $db_pass) || die Could not connect to database: $DBI::errstr; $dbh-do('UPDATE user set lastlogin=now(), lastlogin_ip=? where username=? and domain=?', undef, $ip, $local, $domain); $dbh-disconnect(); } exec /usr/local/libexec/dovecot/$mode; -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:m...@fork.pl, gg:2532994 http://the.fork.pl
Re: [Dovecot] Cyrus vs Dovecot
On Monday of August 11 2008, Proskurin Kirill wrote: And Timo help a lot for many people in this list. Confirmed. Timo (and other users) doesn't leave any (non trivial) question unanswered, wiki is full of useful info, important bugs are fixed quick (follow mercurial repo) and new versions are released often - dovecot is one of best supported open source projects I know... regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] doveot reporting No space left on device - yet df show plenty of space / inodes.
On Tuesday of August 5 2008, Tom Brownlie wrote: Also - it only is happening to a few users at this stage - not all users are having problems sending/receiving emails... this suggests that problem could be quota-related, did you check? regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] doveot reporting No space left on dev ice - yet df show plenty of space / inodes.
On Tuesday of August 5 2008, Tom Brownlie wrote: i do not believe that we have a quota system, but how do I check? mount would show something like /dev/hda6 on /home type ext3 (rw,nosuid,nodev,noatime,usrquota) usrquota is the one, could be also grpquota ro something like that... regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
[Dovecot] installing plugin (autocreate_plugin.c)
Hi I want to enable autocreate-plugin, I downloaded http://dovecot.org/patches/1.1/autocreate-plugin.c compiled as specified in comment and got autocreate_plugin.so but I'm not sure how do I install it. I have many plugins in /usr/local/lib/dovecot/ (it's FreeBSD) and subdirs, but they all have libXX_ prefixes (what do they mean?). I couldn't find any information about installing plugins on dovecot's wiki and I don't want to experiment as the server is live (not really important but still live). regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
[Dovecot] exim, LDA, quota
Hi I configured Exim with dovecot LDA and added quota (dict/mysql). It works but it seems that dovecot is not reporting situation back to exim process - it looks like Exim returns OK(accepted) to smtp sender before the message is actually delivered - if the quota is exceeded then LDA drops the mail and sends DSN. Is it possible to change that behavior to report problem immediately (within SMTP session)? regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] exim, LDA, quota
btw, I know there's a problem when there are many recipients (so mail can be delivered succesfully to some and delivery to others may fail). -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] time going back
On Monday of October 29 2007, Timo Sirainen wrote: More than 5 seconds and Dovecot kills itself. =5 seconds and Dovecot logs a warning and sleeps until it's back in present. good to know Do you think using -a on rdate would not cause such effect? It wouldn't, but it would probably take quite a long time. sure Why don't you just run ntpd to keep the time correct all the time? I do, but firewall misconfiguration blocked it. regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] time going back
On Saturday of October 27 2007, Jeff Grossman wrote: dovecot killing itself because I manually adjusted the clock in the past. Will it not happen in this case? A timezone time adjustment is not a problem. The time one your computer is always based on GMT time. The local time is displayed based on your timezone. It should not have any effect. btw, while checking results of nightly DST change I re-sync-ed one of my boxes to ntp server with rdate and got Oct 28 10:32:48 sas dovecot: Time just moved backwards by 1099 seconds. This might cause a lot of problems, so I'll just kill myself now. 1099 seconds is ~18 minutes How much is too much for dovecot? Do you think using -a on rdate would not cause such effect? fyi rdate(8): -a Use the adjtime(2) call to gradually skew the local time to the remote time rather than just hopping. regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] Thanks!
On Wednesday of March 21 2007, Kyle Wheeler wrote: to allow folders to be LIST'd/SELECT'd/etc. with a trailing separator (to satisfy my pine users). If anyone's interested, I can generate a patch for that stuff. I have many pine users (pine as imap client) on one of servers that I want to migrate to dovecot - I'd be happy to see the patch. Maybe is could be merged to mainstream dovecot (do you think it breaks imap specs?) regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl
Re: [Dovecot] Thanks!
On Wednesday of March 21 2007, you wrote: Note that the behavior that the patch adds worked that way ONLY in BINC imapd. Both Courier and Cyrus give the same NO Mailbox doesn't exist Good, so as (almost former) Courier user I do not have to worry. regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:[EMAIL PROTECTED], gg:2532994 http://the.fork.pl