On Thu, Jan 07, 2010 at 07:43:55PM +0200, Patrick Chemla wrote:

> CPU is more than 85% idle on my postfix I5/750 box, but the outbound queue 
> is very very slow.

    Throughput == Concurrency / Latency

What destination are most of the messages in the queue going to?

What is the associated transport?

Are you using any content filters?

What is the destination concurrency limit for that transport?

What is the delivery latency to that transport? Show a/b/c/d data
averaged (mean, median, stddev) over a bunch of log entries.

> It seems that something refrain qmgr to work at full range, despite the 
> parameters

Most of your parameter tweaks are counter-productive. Do not tweak
anything other than the destination concurrency limit for a transport
that delivers to a high capacity destination you control, say:

        # The 200 is not a golden value, start at 50 and raise only
        # if throughput improves as a result...
        #
        relay_destination_concurrency_limit = 200

> myhostname = postfix.proacti5.net
> mydomain = localpc2105.com
> inet_interfaces = all
> mydestination = $myhostname, localhost.$mydomain, localhost
> unknown_local_recipient_reject_code = 550
> mynetworks = 172.27.27.0/24, 10.0.0.0/24, 127.0.0.0/24
> relayhost = $mydomain

With relayhost set, all remote mail goes to the MX hosts for $mydomain,
so in this case, you can also raise:

        # The 200 is not a golden value, start at 50 and raise only
        # if throughput improves as a result...
        #
        smtp_destination_concurrency_limit = 200

if necessary.

> local_destination_recipient_limit = 500

Terrible idea.

> local_destination_concurrency_limit = 50

Terrible idea.

> debug_peer_level = 8

Absurd.

> debug_peer_list = orange.fr

I hope very little mail goes there...

> default_process_limit = 1000

Raise just the master.cf limits for the smtpd(8) and smtp(8)
services. You don't need 1000 of everything.

> initial_destination_concurrency = 100

Too high.

> transport_initial_destination_concurrency = 100

You misunderstood the docs, this is useless.

> default_destination_concurrency_failed_cohort_limit = 10

Should not be necessary.

> default_destination_recipient_limit = 200

OK.

> transport_destination_recipient_limit = 100

You misunderstood the docs, this is useless.

> default_delivery_slot_cost = 30
> default_minimum_delivery_slots = 30
> default_delivery_slot_discount = 100
> qmgr_fudge_factor = 200

Don't mess with the nqmgr tunables, they are too subtle for mortals.

> smtpd_peername_lookup = no

When output is starved, why make the input even faster?

> default_recipient_limit = 2000000
> qmgr_message_active_limit = 2000000
> qmgr_message_recipient_limit = 2000000

The Postfix queue does not scale to arbitrarily large sizes,
at some point, there is more to do than available capacity to
process the backlog. 2 million active messages may be OK for
a mass-mail engine that fires up periodically, and works as fast
as it can, but it is terrible for a mail forwarding relay. Which
use-case are you in?

> mailbox_size_limit = 5120000000

Why does this machine have any mailboxes at all? Isn't it a relay?
What software performs well with 5GB mailboxes?

> default_destination_concurrency_limit = 500

Better to specify "smtp", "relay" or both, but not "default".

> lmtp_destination_concurrency_limit = $default_destination_concurrency_limit
> smtp_destination_concurrency_limit = $default_destination_concurrency_limit
> relay_destination_concurrency_limit = $default_destination_concurrency_limit
> mime_nesting_limit = 100

These are default settings, don't add them to main.cf

> max_use = 1000

Fine.

> queue_file_attribute_count_limit = 250
> smtpd_history_flush_threshold = 100

Why???

> smtpd_junk_command_limit = 100

Why so generous to the input side?

> smtp_connect_timeout = 10s

Reasonable for a large nearby  MX pool, you can even use 1s if you want.

> smtp_data_done_timeout = 10s

Really not a good idea.

> smtp_mail_timeout = 5s

A bit aggressive...

> smtp  inet    n       -       n       -       -       smtpd

Tune the process limit here

> qmgr  fifo    n       -       n       30      1       qmgr

Why re-scan the incoming queue every 30 seconds? The default is fine.

> smtp  unix    -       -       n       -       -       smtp

Adjust the process limit here to the right number of smtp(8)
delivery agents.

> relay         unix
> -o smtp_fallback_relay=       -       -       n       -       -       smtp

Adjust this process limit if you service any relay domains.

> I tried many combinations to speed up the delivery. Nothing help up to now.

LOGS!!!

> I just found that Postfix could send 1 million emails per hour when I send 
> less than a half million in 24 hours.

LOGS!!!

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majord...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to