🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #19508

Re: REPOST: Q: innd memory usage

#19508
From: Richard Michael Todd
Date: Wed, 23 Jul 1997 00:00
37 lines
1854 bytes
Alan Sparks <asparks@harris.com> writes:

> I've been trying to run INN 1.5.1 with the apb performance patch,
> and I am having huge problems with memory consumption.
> 
> After a couple of days running, innd is up to 80+ meg region size,
> and readers are dead in the water 'cuz I can't fork nnrpd's.

Give the following patch a shot.  It seemed to help with inn1.6b1 (which
includes the latest apb performance patch).  

> I've built in the supplied malloc, as recommended in the FAQ.  Is this
> semi-normal, that innd grows this much this fast?  

No.  The problem is that in the 'immediate write' case where the channel 
feed can accept data right now, even if the write succeeds the 'Used' field
of the buffer is never reset to 0, so innd needs to keep making the buffer
bigger and bigger...

--- site.c	1997/07/19 21:23:42	1.6
+++ site.c	1997/07/20 03:46:48
@@ -272,8 +272,11 @@
 		bp->Used += j;
 		i = cp->Out.Left;
 	    }
-	    if (bp->Left <= 0)
+	    if (bp->Left <= 0) {
+		/* reset Used, Left on bp, keep channel buffer size from exploding. */
+		bp->Used = bp->Left = 0;
 		WCHANremove(cp);
+	    }
 	    else
 		WCHANadd(cp);
 	}

Technical Details
Message-ID: <vz2pvsas6hp.fsf@ticonderoga.ecn.ou.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <33D4F167.BBA@harris.com>

Show Full Headers
Complete Article Headers
Message-ID: <vz2pvsas6hp.fsf@ticonderoga.ecn.ou.edu>
Subject: Re: REPOST: Q: innd memory usage
Date: Wed, 23 Jul 1997 00:00:00 +0000
From: Richard Michael Todd <rmtodd@wildstar.net>
References: <33D4F167.BBA@harris.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 258256575
X-Complaints-To: news@choctaw.wildstar.net
X-Trace: choctaw.wildstar.net 869634342 29433 (None) 198.203.196.143
Organization: WildStar Internet Services
Newsgroups: news.software.nntp