Date: Fri, 28 Oct 2005 11:09:42 +0200 (CEST) From: Andre Albsmeier <Andre.Albsmeier@siemens.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/88120: [PATCH] procmail again very slow on 5.x Message-ID: <200510280909.j9S99gb7097212@curry.mchp.siemens.de> Resent-Message-ID: <200510280910.j9S9ADZc094805@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 88120 >Category: ports >Synopsis: [PATCH] procmail again very slow on 5.x >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 28 09:10:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andre Albsmeier >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: FreeBSD 5.4-STABLE #0: Mon Oct 17 17:53:08 CEST 2005 using procmail from ports to deliver emails >Description: Years ago we found out that mail/procmail behaves badly (very slow when delivering large emails) due to its way it (ab)uses realloc(). Later, some logic was added to procmail to detect systems with "inefficient realloc" and appropriate measures are being taken. This detection logic doesn't work anymore on FreeBSD 5.4 (and, I suspect, on later versions as well) and procmail runs slow again. >How-To-Repeat: Deliver big emails through procmail on 5.4 and 4.11. Measure and compare the time it takes. >Fix: Well, I simply enabled the INEFFICIENTrealloc measure and procmail ran about 50(!) times faster here when delivering big emails: --- src/autoconf.ORI Thu Oct 27 13:11:02 2005 +++ src/autoconf Thu Oct 27 13:12:48 2005 @@ -968,7 +968,7 @@ free(q); printf("/* %d move%s in %d steps of size %d when reallocing */\n", count,count==1?"":"s",(int)(max/BLKSIZ),BLKSIZ); - if(BLKSIZ*(10*count+1)>max) + if( 1 || BLKSIZ*(10*count+1)>max) { puts("#define INEFFICIENTrealloc"); exit(1); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510280909.j9S99gb7097212>