[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SMTP Configuration Help

On Mon, Jan 24, 2000 at 03:44:28PM -0800, Kulick, Aaron wrote:
> Dear Ladies and Gentlemen,
> Previously I had requested assistance in allowing multiple threads and have
> since modified my $MAILSHARE/scheduler.conf file to read as follows:
> smtp/*.com
>   maxchannel=199
>   maxring=30
>   maxthr=10
>   command="smtp -s -l ${LOGDIR}/multi-thread"
> Now, if I understand the comments and the advice given to me, the above
> should cap the maximum number of threads to 10.  However, in reality I am
> seeing something much different in /var/log/syslog:

> Jan 24 15:11:59 mailrouter1 smtp[10220]: [SNIP]  Message received OK
> Jan 24 15:12:00 mailrouter1 smtp[10502]: [SNIP]  Message received OK
> Jan 24 15:12:00 mailrouter1 smtp[10220]: [SNIP]  Message received OK
> Jan 24 15:12:01 mailrouter1 smtp[10502]: [SNIP]  Message received OK
> Jan 24 15:12:01 mailrouter1 smtp[10220]: [SNIP]  Message received OK
> ....etc
> Basically, only two threads...I am curious, what is going on?  The queue at

	I am quoting from   proto/scheduler.conf  file comments:

#  MaxTHR:   ( max processes per thread; default: 1 )
#       This limits the number of parallel transport agents within each
#       thread; that is, using higher value than default ``1'' will allow
#       running more than one TA for the jobs at the thread.
#	Do note that running more than one TA in parallel may also require
#	lowering OVERFEED value.  (E.g. having a queue of 30 messages will
#	not benefit from more TAs, unless they all get something to process.
#	Having OVERFEED per default at 150 will essentially feed whole queue
#	to one TA, others are not getting any.)

> that time had nearly 100 messages all addressed to the SAME address on our
> internal LAN.  Which represents our normal/typical traffic pattern for our
> application.  Is there any way in which I could optimize this to say create
> 5, 10 or even 15 simultaneous SMTP processes?  What factors effect the
> maximum thread total?

	The "thread" means (in ZMailer) groupped  channel+host  destination
	pairs.  There "MaxTHR=" parameter name is slightly misleading..
	(E.g.:  smtp/navin.com  smtp/foo.navin.com   smtp/nic.funet.fi
	 are three different threads for the ZMailer.)

	So you have 100 messages, but if your OverFeed= value is not
	lowered from  MaxTHR=1  value of 150 to something which ALLOWS
	your thread local TAs to run more in parallel, you are going to
	have one TA to glob up about 85-90 of the tasks, while rest
	will have one or two..  Lower the  OverFeed= to e.g. 10, and
	work should be more evenly distributed.

	If your network connectivity to your downstream peer is limited,
	it might not make sense to have more than 2-3 parallel TAs at
	any given thread anyway.

	In classical SMTP universe the RFC 821 defines a HALF-DUPLEX
	protocol, which is terribly slow on long latency links with
	a large number of recipients.

	If your downstream peer speaks PIPELINING, sending large number
	of addresses down a long latency link is bigway optimized to have
	only two round-trip delays mandatory during message transmission.
	(After MAIL+RCPT+DATA, and another at DATA-ending-dot.)

	If it speaks also CHUNKING (both ESMTP extensions), then there
	can be down to one synchronization point during the transmit at
	the end of the BDAT LAST -- if the message is small enough..

> Again, your patience, time and assistance are sincerely and deeply
> appreciated.
> Thank you,
> Aaron D. Kulick
> Navin.com, Inc.

/Matti Aarnio	<mea@nic.funet.fi>