ExtMail服务器社区's Archiver

hzqbbc 发表于 2002-11-12 11:07

关于Postfix性能调整(maillist)(good!)

[b]注意看viktor的发言![/b]

所有留言及回应
Message 1 in thread
寄件者:Simon White (simon@mtds.com)
主旨:Re: Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 04:10:07 PST


07-Oct-02 at 00:54, Brian Wizard (brian@xtnd.net) wrote :
> >From what I have heard, postfix is supposedly a robust and scalable MTA.
> In the past 24 hours I have loaded postfix on a server running FreeBSD
> 4.7-RC with dual 2 gig Xeon procs with 1 gig of RAM and an SMP kernel.
> However, Postfix seems to be running out of resources as time goes on.

Did you see the post this morning re:

http://www.stahl.bau.tu-bs.de/~hildeb/postfix/bottleneck.shtml

--
[Simon White. vim/mutt. simon@mtds.com. GIMPS:1.930% see www.mersenne.org]
If it dies, it's biology. If it blows up, it's chemistry, and if it
doesn't work, it's physics.
[Linux user #170823 http://counter.li.org. Home cooked signature rotator.]
-
To unsubscribe, send mail to majordomo@postfix.org with content
(not subject): unsubscribe postfix-users
Message 2 in thread
寄件者:Brian Wizard (brian@xtnd.net)
主旨:Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 04:20:25 PST


Greetings,

From what I have heard, postfix is supposedly a robust and scalable MTA.
In the past 24 hours I have loaded postfix on a server running FreeBSD
4.7-RC with dual 2 gig Xeon procs with 1 gig of RAM and an SMP kernel.
However, Postfix seems to be running out of resources as time goes on. I
am very new to Postfix and the only tuning options I have set in main.cf
are the following:

qmgr_message_active_limit = 7000
local_destination_concurrency_limit = 600
default_destination_concurrency_limit = 600
default_process_limit=600
process_limit=600


When I raise the process_limits/concurrency_limits to more than 600 the
server starts swapping for memory? And outputs the following message in
/var/log/messages:

Oct 7 08:38:39 server1 postfix/trivial-rewrite[48810]: fatal: accept
connection: Too many open files

If I leave the settings the way they are, postfix takes a long
time to respond on port 25 (more than 1 minute) after it has been running
for a few hours.

I have played with many kernel settings and nothing seems to help, could
this just be a limitation on Postfix? This server is processing close to 2
million emails/day.


I don't think postfix should need more than this...

root@server1:~# su - postfix
postfix@server1:~% ulimit -n
39218

I have maxfiles set to the maximum amount in the kernel as well.

root@server1:~# sysctl kern.maxfiles
kern.maxfiles: 65536


Has anyone run into a situation such as this before? Or can anyone make a
suggestions as far what optimization settings should be incorporated into
postfix for email systems with high loads? BTW, I have been running qmail
with no problems, but I would really like to switch to postfix if at all
possible. Thanks for your help.


Brian Wizard

-
To unsubscribe, send mail to majordomo@postfix.org with content
(not subject): unsubscribe postfix-users
Message 3 in thread
寄件者:Ralf Hildebrandt (Ralf.Hildebrandt@charite.de)
主旨:Re: Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 04:26:03 PST


On Mon, Oct 07, 2002 at 12:54:49AM -1000, Brian Wizard wrote:

> When I raise the process_limits/concurrency_limits to more than 600 the
> server starts swapping for memory?

Shit happens. I guess you can never have enough RAM, can you?

> Oct 7 08:38:39 server1 postfix/trivial-rewrite[48810]: fatal: accept
> connection: Too many open files

The kernel cannot handle that many open files.

--
Ralf Hildebrandt (Im Auftrag des Referat V a)  Ralf.Hildebrandt@charite.de
Charite Campus Mitte              Tel. +49 (0)30-450 570-155
Referat V a - Kommunikationsnetze -       Fax. +49 (0)30-450 570-916
Why you can't find your system administrators:
(S)he's out buying some caffeine.

-
To unsubscribe, send mail to majordomo@postfix.org with content
(not subject): unsubscribe postfix-users

寄件者:Chris Laco (claco@summitracing.com)
主旨:RE: Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 06:36:16 PST


Have you done this stuff yet?
http://www.daemonnews.org/200108/benchmark.html

寄件者:lst_hoe (lst_hoe@kwsoft.de)
主旨:Re: Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 07:34:01 PST



At 10:10 07.10.2002 -0400, Victor.Duchovni@morganstanley.com wrote:
>Two million messages a day is a high load: *average* of 23 messages per
>second, with presumably much higher peaks during the day. How high are
>the peaks? Are you sure your I/O subsystem is up to the task. What maps
>are you using for your transport table? Figure out the expected query rate
>(at least 3 per recipient, more if you are using the snapshot release) and
>query latency. Make sure that queries against the transport table can be
>completed in ~5ms (1000/23/10) perhaps less if the intra business day mail
>flow is substantially higher than 23 msgs/sec.
>
>Consider mjt's CDB patch for as many maps as possible. Show output of
>"postconf -n".


May i raise some questions :

Where do this mails go to?
Who has that great volume in the pacific provider area (xtnd.net)?
What kind of people who don′t even read the FAQ try to process 2 million
mails a day?
Strange sender-name, maybe related to this one http://www.brianwizard.com/ :-)

Regards


--

Andreas H?dle

Kühn & Weyh Software GmbH

WWW.KWSOFT.DE

-
To unsubscribe, send mail to majordomo@postfix.org with content
(not subject): unsubscribe postfix-users
Message 6 in thread
寄件者:Victor.Duchovni@morganstanley.com (Victor.Duchovni@morganstanley.com)
主旨:Re: Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 07:52:03 PST


On Mon, 7 Oct 2002, Brian Wizard wrote:

> qmgr_message_active_limit = 7000

Don't lower this. If your machine has enough memory raise it to 20000 or
more, but not to solve this problem. It is unrelated to throughput.

> local_destination_concurrency_limit = 600
> default_destination_concurrency_limit = 600

Don't raise these.

> default_process_limit=600

Try 200-400.

> process_limit=600
>

This is not a postfix configuration parameter.

>
> When I raise the process_limits/concurrency_limits to more than 600 the
> server starts swapping for memory? And outputs the following message in
> /var/log/messages:
>
> Oct 7 08:38:39 server1 postfix/trivial-rewrite[48810]: fatal: accept
> connection: Too many open files
>

The trivial-rewrite daemon cannot handle that many concurrent connections.
You must be using very slow maps. Is LDAP or MySQL used for the transport
table by any chance? Keep the transport table fast, don't use slow
transport maps.


> If I leave the settings the way they are, postfix takes a long
> time to respond on port 25 (more than 1 minute) after it has been running
> for a few hours.

See above.

>
> I have played with many kernel settings and nothing seems to help, could
> this just be a limitation on Postfix? This server is processing close to 2
> million emails/day.
>

Two million messages a day is a high load: *average* of 23 messages per
second, with presumably much higher peaks during the day. How high are
the peaks? Are you sure your I/O subsystem is up to the task. What maps
are you using for your transport table? Figure out the expected query rate
(at least 3 per recipient, more if you are using the snapshot release) and
query latency. Make sure that queries against the transport table can be
completed in ~5ms (1000/23/10) perhaps less if the intra business day mail
flow is substantially higher than 23 msgs/sec.

Consider mjt's CDB patch for as many maps as possible. Show output of
"postconf -n".

--
Viktor.

-
To unsubscribe, send mail to majordomo@postfix.org with content
(not subject): unsubscribe postfix-users
Message 7 in thread
寄件者:Victor.Duchovni@morganstanley.com (Victor.Duchovni@morganstanley.com)
主旨:Re: Postfix Choking?


View this article only
新闻群组:mailing.postfix.users
日期:2002-10-07 11:50:03 PST


On Mon, 7 Oct 2002, Brian Wizard wrote:

>
>
> Hi Victor,
>
> Thanks for the helpful response. What you said sounds right, we have over
> 10,000 entries in a flat shadow file and trivial rewrite is probably
> choking there. So hashing the passwd file into a CDB should help you
> think? Thanks


No. Trivial rewrite does not consult the password file. It uses
"transport_maps" if set, but you do not set up transport_maps, so
trivial-rewrite is being starved for other reasons, see below, but do you
have enough disk I/O to handle the load? What is the nature of the
traffic, why are you processing 2 million messages a day. Are they inbound
or outbound?

> default_destination_concurrency_limit = 600

Lose this, leave set to default.

> default_process_limit = 600

Lower this (Try 400 or 200).

> local_destination_concurrency_limit = 600

Defitely don't do this! This is 600 concurrent connections to a
single mailbox! Leave at the default value of 2.


> local_recipient_maps = $alias_maps unix:passwd.byname

If your password file is not hashed (nsswitch.conf) and has 10,000
entries, this may cost you a lot here by substantially increasing
"smtpd" concurrency. Make sure to configure a fast random access path to
your user database. If you can't do this system-wide, create a separate
hashed database for use by Postfix and replace unix:passwd.byname with
hash:... (or CDB for even better performance).

> maps_rbl_domains = relays.visi.com

Is this providing timely responses? If not dump it and use someone who
does.

> qmgr_message_active_limit = 7000

Raise this to 20000 or leave the default alone at 10000

> smtpd_banner = $myhostname postfix

Why not leave the default alone. Putting "ESMTP" in the banner increases
the probability that the sender will use ESMTP and hence
predeclared size limits with pipelining.

--
Viktor.

liuxulin 发表于 2009-8-5 17:02

好文章,可是我没有办法解决Too many open files的错误,以提高更多性能。看官方网站说要重新编译,或则使用2.4的版本,不知道大家是怎么处理的

hzqbbc 发表于 2009-8-5 17:08

贴下您的日志错误看看到底是怎样的?您的服务器流量情况,各种系统指标是什么呢?欢迎讨论Postfix高性能应用:lol

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.