From nobody@FreeBSD.org  Wed Feb 15 09:17:44 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4F8FF16A420
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Feb 2006 09:17:44 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1DBDC43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Feb 2006 09:17:44 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k1F9Hhbg073151
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Feb 2006 09:17:43 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k1F9HhWJ073150;
	Wed, 15 Feb 2006 09:17:43 GMT
	(envelope-from nobody)
Message-Id: <200602150917.k1F9HhWJ073150@www.freebsd.org>
Date: Wed, 15 Feb 2006 09:17:43 GMT
From: Juris Orlovs <jollyroger@one.lv>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Slow data transfer in Postfix and Cyrus IMAP (problem fix known)
X-Send-Pr-Version: www-2.3

>Number:         93378
>Category:       kern
>Synopsis:       [tcp] Slow data transfer in Postfix and Cyrus IMAP (workaround known)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 15 09:20:03 GMT 2006
>Closed-Date:    
>Last-Modified:  Mon Feb 02 15:19:42 UTC 2009
>Originator:     Juris Orlovs
>Release:        6.0
>Organization:
>Environment:
FreeBSD mx.test.lv 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Sat Jan 21 18:50:10 EET 2006     root@mx.test.lv:/usr/src/sys/i386/compile/SMP-686  i386
      
>Description:
There is a problem with Postfix (2.2.8; 2.3-20060112) and Cyrus IMAP (2.3.1) (installed from ports)

With Postfix on FreeBSD 6.0, transferring of messages using SMTP is slow, aproximately 7MB in 20 seconds on direct 100MBit/s link.

In Cyrus IMAP there is a issue with message writing to IMAP folders. Reading of 8MB message takes a bit less than a second, but in that time 8MB message write to IMAP folder over 100Mbit/s connection takes ~7 seconds. If writing many small messages to imap folder (~1KB in size) then average transfer rate of them is ~10 messages per second.

Hardware: (2x 3GHx Xeon, 2GB RAM, Adaptec 2410SA, 2x WD RAPTOR 74GB, 2x SEAGATE 300GB, Mainboard - Intel SE7520BD2)

For example, there is no such problems with FTP.
>How-To-Repeat:

>Fix:
"sysctl -w net.inet.tcp.delayed_ack=0" fixes mentioned problems with data transfer
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->net 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Sat Mar 8 20:58:36 UTC 2008 
Responsible-Changed-Why:  
Over to maintainers. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93378 

From: Anton Yuzhaninov <citrin@citrin.ru>
To: bug-followup@FreeBSD.org, jollyroger@one.lv
Cc:  
Subject: Re: kern/93378: [tcp] Slow data transfer in Postfix and Cyrus IMAP
 (workaround known)
Date: Sun, 09 Mar 2008 00:43:45 +0300

 Probably it is interact between delayed ack and Nagle's algorithm.
 
 They shouldn't be used together:
 http://developers.slashdot.org/comments.pl?sid=174457&cid=14515105
 
 So application which may be affected by this problem should disable
 Nagle's algorithm for via socket option TCP_NODELAY.
 
 As I can see current postfix uses setsockopt TCP_NODELAY so consider
 to upgrade postfix to 2.4.7 or 2.5.1 first.
 Postifx 2.2.8 is too old.
 
 -- 
 WBR,
   Anton Yuzhaninov
Responsible-Changed-From-To: net->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Mar 9 06:32:55 UTC 2008 
Responsible-Changed-Why:  
Canonicalize assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93378 
State-Changed-From-To: open->feedback 
State-Changed-By: rwatson 
State-Changed-When: Mon Feb 2 15:18:25 UTC 2009 
State-Changed-Why:  
Dear Juris: 

I was wondering if you had received Anton's follow-up regarding Postfix 
and TCP_NODELAY, in particular, whether upgrading Postfix versions had 
resolved the problem for you. 

Thanks, 
Robert 


http://www.freebsd.org/cgi/query-pr.cgi?pr=93378 
>Unformatted:
