Hello, I'm doing some experiments with a synthetic benchmark and 
postfix.  My current postfix configuration can deliver ~3000 
msg/sec to 1000 virtual mailboxes; however, the system (16 
core/4x4 AMD opteron) is ~90% idle.  All logs and queues reside 
in a RAM filesystem, so disk IO is not a bottleneck.  I am 
generating the incoming load locally using (a slightly modified) 
smtp-source, so the network is not a bottleneck.  smtp-source is 
generating 10k emails and smtpd/cleanup can put the incoming 
emails on the incoming queue much faster than the qmgr can pull 
them off.  Besides the incoming and active queues, all queues are 
empty during the benchmark.  Ideally I want the system to be 0% 
idle.  Any suggestions on how to achieve this?

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
alternate_config_directories = /etc/postfix1, /etc/postfix2
append_dot_mydomain = no
biff = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /tmp/mail/0/lib/postfix
default_destination_concurrency_limit = 1
default_destination_recipient_limit = 1000
default_process_limit = 200
default_recipient_refill_limit = 100000
disable_dns_lookups = yes
html_directory = no
in_flow_delay = 0
inet_interfaces = all
initial_destination_concurrency = 500
mail_owner = postfix
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = localhost.csail.mit.edu, , localhost
myhostname = localhost.csail.mit.edu
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
newaliases_path = /usr/bin/newaliases
qmgr_message_active_limit = 80000
qmgr_message_recipient_limit = 80000
queue_directory = /tmp/mail/0/postfix
readme_directory = no
recipient_delimiter = +
relayhost = 
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_connection_count_limit = 0
smtpd_peername_lookup = no
syslog_facility = local0
virtual_gid_maps = static:1000
virtual_mailbox_base = /tmp/mail/vhosts
virtual_mailbox_domains = goo.com
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:1000

Here is sequence from strace -p <qmgr> -T -tt:

12:34:33.138590 lstat("incoming/2303823913A8", {st_mode=S_IFREG|0700, 
st_size=10797, ...}) = 0 <0.000009>
12:34:33.138648 rename("incoming/2303823913A8", "active/2303823913A8") = 0 
<0.000012>
12:34:33.138697 open("active/2303823913A8", O_RDWR) = 10 <0.000008>
12:34:33.138738 flock(10, LOCK_EX|LOCK_NB) = 0 <0.000006>
12:34:33.138773 lseek(10, 0, SEEK_CUR)  = 0 <0.000006>
12:34:33.138808 read(10, "CO          10291             50"..., 4096) = 4096 
<0.000009>
12:34:33.138863 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.138925 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.138981 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.139044 sendto(7, "<134>Feb 11 12:34:33 postfix/qmg"..., 108, 
MSG_NOSIGNAL, NULL, 0) = 108 <0.000013>
12:34:33.139114 lseek(10, 6697, SEEK_CUR) = 10793 <0.000006>
12:34:33.139149 read(10, "X\0E\0", 4096) = 4 <0.000006>
12:34:33.139187 lseek(10, 0, SEEK_END)  = 10797 <0.000006>
12:34:33.139221 unlink("defer/2/2303823913A8") = -1 ENOENT (No such file or 
directory) <0.000008>
12:34:33.139266 poll([{fd=11, events=POLLIN}], 1, 0) = 0 <0.000006>
12:34:33.139305 poll([{fd=11, events=POLLOUT, revents=POLLOUT}], 1, 3600000) = 
1 <0.000006>
12:34:33.139345 write(11, "request\0resolve\0sender\0...@josmp"..., 57) = 57 
<0.000068>
12:34:33.139478 poll([{fd=11, events=POLLIN, revents=POLLIN}], 1, 3600000) = 1 
<0.000007>
12:34:33.139524 read(11, "flags\0000\0transport\0virtual\0nextho"..., 4096) = 
79 <0.000009>
12:34:33.139579 close(10)               = 0 <0.000007>
12:34:33.139617 epoll_wait(8, {}, 100, 0) = 0 <0.000006>
12:34:33.139651 alarm(333)              = 333 <0.000006>
12:34:33.139699 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000008>
12:34:33.139763 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000008>
12:34:33.139824 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.139888 sendto(7, "<134>Feb 11 12:34:33 postfix/qmg"..., 82, 
MSG_NOSIGNAL, NULL, 0) = 82 <0.000011>
12:34:33.139947 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.140012 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000008>
12:34:33.140070 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000008>
12:34:33.140134 sendto(7, "<134>Feb 11 12:34:33 postfix/qmg"..., 131, 
MSG_NOSIGNAL, NULL, 0) = 131 <0.000011>
12:34:33.140190 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000008>
12:34:33.140260 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.140319 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000009>
12:34:33.140383 sendto(7, "<134>Feb 11 12:34:33 postfix/qmg"..., 66, 
MSG_NOSIGNAL, NULL, 0) = 66 <0.000014>
12:34:33.140443 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.140506 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000007>
12:34:33.140566 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, 
...}) = 0 <0.000008>
12:34:33.140631 sendto(7, "<134>Feb 11 12:34:33 postfix/qmg"..., 74, 
MSG_NOSIGNAL, NULL, 0) = 74 <0.000011>
12:34:33.140682 lstat("incoming/2301623929FB", {st_mode=S_IFREG|0700, 
st_size=10797, ...}) = 0 <0.000010>
12:34:33.140743 rename("incoming/2301623929FB", "active/2301623929FB") = 0 
<0.000013>

Silas

Reply via email to