5.5 SMTP PIPELINING

Starting in version 8.12, sendmail implements support for SMTP PIPELINING. A complete description of this feature appears in RFC 2920 [FRE00]. A brief description will be given here. Basically, PIPELINING allows the sending of multiple SMTP commands without having to wait for a response from the server. Some commands can be sent in this manner, such as the transmission of SMTP envelope information. Some SMTP commands may not be pipelined, such as DATA, QUIT, and NOOP.

Let us consider a sample SMTP conversation without the use of PIPELINING. In the following examples, the client side of the conversation is prefaced with a "C:" and the server side of the conversation is prefaced with an "S:". Lines preceded by neither an "S:" nor a "C:" are continuations of the previous line. A short horizontal line denotes a separate request or response sent by the client or server:

 S: 220 discovery.gangofone.com ESMTP Sendmail 8.12.2/8.12.2;     Tue, 9 Feb 2002 18:04:55 -0800 (PST)  -- C: EHLO streaker.gangofone.com  -- S: 250-discovery.gangofone.com Hello streaker.gangofone.com,     pleased to meet you  S: 250-ENHANCEDSTATUSCODES  S: 250-8BITMIME  S: 250-SIZE  S: 250-DSN  S: 250-ETRN  S: 250-STARTTLS  S: 250-DELIVERBY  S: 250 HELP  -- C: MAIL FROM:<npc@streaker.gangofone.com>  -- S: 250 2.1.0 <npc@streaker.gangofone.com>... Sender ok  -- C: RCPT TO:<jim@gangofone.com>  -- S: 250 2.1.5 <jim@gangofone.com>... Recipient ok  -- C: RCPT TO:<scott@gangofone.com>  -- S: 250 2.1.5 <scott@gangofone.com>... Recipient ok  -- C: DATA  -- S: 354 Enter mail, end with "." on a line by itself  -- C: Subject: Hello!  C: [other headers omitted for the sake of brevity]  C:  C: Thinking about it, I've got nothing to say.  C: .  -- S: 250 2.0.0 g1PNlHLq032937 Message accepted for delivery  -- C: QUIT  -- S: 221 2.0.0 discovery.gangofone.com closing connection 

Sending this message required 15 separate messages to be exchanged between the client and server.

This is what the SMTP conversation would look like if both the client and server supported SMTP PIPELINING:

 S: 220 discovery.gangofone.com ESMTP Sendmail 8.12.2/8.12.2;     Tue, 9 Feb 2001 18:05:25 -0800 (PST)  -- C: EHLO streaker.gangofone.com  -- S: 250-discovery.gangofone.com Hello streaker.gangofone.com,     pleased to meet you  S: 250-ENHANCEDSTATUSCODES  S: 250-PIPELINING  S: 250-8BITMIME  S: 250-SIZE  S: 250-DSN  S: 250-ETRN  S: 250-STARTTLS  S: 250-DELIVERBY  S: 250 HELP  -- C: MAIL FROM:<npc@streaker.gangofone.com>  C: RCPT TO:<jim@gangofone.com>  C: RCPT TO:<scott@gangofone.com>  C: DATA  -- S: 250 2.1.0 <npc@streaker.gangofone.com>... Sender ok  S: 250 2.1.5 <jim@gangofone.com>... Recipient ok  S: 250 2.1.5 <scott@gangofone.com>... Recipient ok  S: 354 Enter mail, end with "." on a line by itself  -- C: Subject: Hello!  C: [other headers omitted for the sake of brevity]  C:  C: Upon further reflection, I've got nothing to say.  C: .  C: QUIT  -- S: 250 2.0.0 g1PNlHLq032937 Message accepted for delivery  S: 221 2.0.0 discovery.gangofone.com closing connection 

The same information is exchanged, but this time it required only seven network round trips to complete the session.

In situations where messages have a very large number of recipients, or on networks where the latency is exceptionally high, PIPELINING can provide a significant benefit. The same data move between client and server, which means the same bandwidth is consumed and the same disk operations need to be performed. Fewer TCP packets are sent, however, and we expect the total exchange to consume less time. This results in fewer concurrent processes running on the servers. The use of PIPELINING doesn't always produce a large improvement in performance, but in the case of sending large mailing lists, it may yield a significant positive effect.

Of course, for PIPELINING to effectively reduce the duration of SMTP sessions, both the client and server must support it. As of this writing, few large ISPs, which represent the destinations of a large percentage of large mailing list email, run MTAs that support this extension. Further, because it was introduced to sendmail fairly recently, there is not yet a large body of experience from which the overall effects of this feature can be evaluated. However, making sure a mass-mailing SMTP client can support this feature is a good idea. The benefits of doing so may not be significant at the present time, but the advantages will likely become more apparent as more sites run MTAs that support this feature.



sendmail Performance Tuning
sendmail Performance Tuning
ISBN: 0321115708
EAN: 2147483647
Year: 2005
Pages: 67

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net