From owner-freebsd-questions Fri Aug 14 10:38:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA04068 for freebsd-questions-outgoing; Fri, 14 Aug 1998 10:38:24 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA04063 for ; Fri, 14 Aug 1998 10:38:22 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer david.siemens.de) Received: from mail.siemens.de (salomon.siemens.de [139.23.33.13]) by david.siemens.de (8.9.1/8.9.1) with ESMTP id TAA24034 for ; Fri, 14 Aug 1998 19:37:47 +0200 (MET DST) Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23]) by mail.siemens.de (8.9.1/8.9.1) with ESMTP id TAA27900 for ; Fri, 14 Aug 1998 19:37:48 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.8/8.8.8) id TAA13781 for ; Fri, 14 Aug 1998 19:37:44 +0200 (CEST) From: Andre Albsmeier Message-Id: <199808141737.TAA13045@internal> Subject: Re: Procmail In-Reply-To: <19980814083550.A3557@flarn.dyn.ml.org> from Matthew Hunt at "Aug 14, 98 08:35:50 am" To: mph@pobox.com (Matthew Hunt) Date: Fri, 14 Aug 1998 19:37:39 +0200 (CEST) Cc: craig@hotmix.com.au, freebsd-questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Fri, Aug 14, 1998 at 04:14:26PM +0800, Craig Beasland wrote: > > > Has anyone used procmail for FreeBSD. I need some of the functionality, but > > found mention of some memory problems using it - particularly under FreeBSD. > > I do, and I would hope that a lot of people reading freebsd-questions > and other high-volume lists would do so as well. I get hundreds of > messages per day, and sure wouldn't want them all ending up in my > inbox! > > Procmail can be somewhat memory-hungry (and CPU hungry, depending on > your rules). I've seen it bring a 486 with 16 MB to its knees for > 15 minutes or so, when a backlog of list mail was delivered. I have > never had any problems on my own machine, which has had 32 MB and up. > > It is my understanding that procmail needs to hold the whole message > in memory during processing; if you regularly get big emails (on the > order of your memory size) expect problems. Well there had been problems when you were receiving big mails (big means here >10MB on a 64MB machine with 512MB swap). This was due to the silly way that procmail uses when reading the message: It reads it in small (32k IIRC) chunks and reallocs the memory after that for every chunk. This made the process rather slow and very very memory consuming. I have made a small and ugly patch to circumvent this: Memory is now realloced in 4M chunks. This doesn't hurt for small messages because the memory only gets used if it is really accessed. (Hope the VM hackers forgive me for this primitve way of describing this :-)) The patch is now in mail/procmail/patches/patch-ae, so if you use procmail by using the port, you should be fine. Now I have tested 128MB messages on the baove machines without problems. -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message