Santiago Romero: > Wietse Venema escribi?: > > Santiago Romero: > > > >> I case it happens again ... Where or what should I take a look? At OS > >> level (disk or network I/O, processes...) I didn't see anything before > >> the "postfix restart"... > >> > > > > Try ``strace -o filename -p pid'' or the equivalent for your OS. > > > > Hi. > > Today happened again in 2 new machines. The last one: > > > top - 09:44:25 up 19:39, 2 users, load average: 4.68, 4.87, 4.76 > Tasks: 154 total, 6 running, 148 sleeping, 0 stopped, 0 zombie > Cpu(s): 30.7%us, 49.2%sy, 0.0%ni, 11.7%id, 1.3%wa, 1.0%hi, 6.1%si, > 0.0%st > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ > COMMAND > 26926 postfix 20 0 5840 2552 1792 R 43 0.3 276:51.22 qmgr > > > The problem was never appeared in those machines until, yesterday, I > added the following to postfix configuration: > > #### /etc/postfix/master.cf > slow unix - - - - - smtp > -o syslog_name=postfix-slow > > > #### /etc/postfix/main.cf > # Special "slow" transport: > slow_destination_recipient_limit=1 > slow_destination_concurrency_limit=1 > slow_destination_rate_delay=5
OK, leave the above settings and see if this helps (Postfix 2.5 or later). I have not been able to reproduce the problem, but there was some bogosity with the handling of _destination_rate_delay. The only reason I know for lots of qmgr CPU usage is when all mail is being delivered to a "discard" transport. When all mail is bounced or deferred you'd have lots of disk activity that causes qmgr to be slowed down. Wietse diff --exclude=man --exclude=html --exclude=README_FILES --exclude=.indent.pro --exclude=Makefile.in -cr src/qmgr/qmgr_entry.c- src/qmgr/qmgr_entry.c *** src/qmgr/qmgr_entry.c- Fri Dec 14 17:47:21 2007 --- src/qmgr/qmgr_entry.c Wed Mar 4 16:04:21 2009 *************** *** 299,304 **** --- 299,317 ---- } /* + * Suspend a rate-limited queue, so that mail trickles out. + */ + if (which == QMGR_QUEUE_BUSY && transport->rate_delay > 0) { + if (queue->window > 1) + msg_panic("%s: queue %s/%s: window %d > 1 on rate-limited service", + myname, transport->name, queue->name, queue->window); + if (QMGR_QUEUE_THROTTLED(queue)) /* XXX */ + qmgr_queue_unthrottle(queue); + if (QMGR_QUEUE_READY(queue)) + qmgr_queue_suspend(queue, transport->rate_delay); + } + + /* * If the queue was blocking some of the jobs on the job list, check if * the concurrency limit has lifted. If there are still some pending * deliveries, give it a try and unmark all transport blockers at once. *************** *** 336,354 **** */ if (which == QMGR_QUEUE_BUSY) queue->last_done = event_time(); - - /* - * Suspend a rate-limited queue, so that mail trickles out. - */ - if (which == QMGR_QUEUE_BUSY && transport->rate_delay > 0) { - if (queue->window > 1) - msg_panic("%s: queue %s/%s: window %d > 1 on rate-limited service", - myname, transport->name, queue->name, queue->window); - if (QMGR_QUEUE_THROTTLED(queue)) /* XXX */ - qmgr_queue_unthrottle(queue); - if (QMGR_QUEUE_READY(queue)) - qmgr_queue_suspend(queue, transport->rate_delay); - } /* * When the in-core queue for this site is empty and when this site is --- 349,354 ----