From jerry@rigel.whowhere.com Tue Apr 8 11:30:19 EDT 1997 Article: 31732 of news.software.nntp Path: news.math.psu.edu!news3.cac.psu.edu!howland.erols.net!newsxfer.itd.umich.edu!uunet!in2.uu.net!205.230.7.55!whowhere.com!jerry From: jerry@rigel.whowhere.com (Jerry Aguirre) Newsgroups: news.software.nntp Subject: INN: patch for overchan backlogs Date: 8 Apr 1997 02:41:11 GMT Organization: WhoWhere?; Mt. View, CA USA Lines: 55 Message-ID: <5icb87$jlr$1@fes.whowhere.com> NNTP-Posting-Host: rigel.whowhere.com Summary: Keeps overchan up with incomming articles Xref: news.math.psu.edu news.software.nntp:31732 A common problem with INN on many systems is that the channel feed to overchan gets farther and farther behind until innd burps the excess to a file in the out.going spool. This file is useless as there is no existing mechanism to process it. The problem turns out to not be with overchan but with innd not being able to write the data fast enough to keep up with overchan. The size of the OS buffer used for pipes limits the amount that can be written on each loop of innd's channel scheduler. The following patch has been running here for a little over a month. Manual runs of "expireover -a" show only the "-" entries for cancelled articles. Never a "+" for dropped or not up to date overchan entries. Jerry Aguirre *** innd/site.c.orig Tue Dec 17 06:40:40 1996 --- innd/site.c Thu Feb 20 10:35:49 1997 *************** *** 260,267 **** if (i < sp->StopWriting) WCHANremove(cp); if ((sp->StartWriting == 0 || i > sp->StartWriting) ! && !CHANsleeping(cp)) ! WCHANadd(cp); cp->LastActive = Now.time; --- 260,284 ---- if (i < sp->StopWriting) WCHANremove(cp); if ((sp->StartWriting == 0 || i > sp->StartWriting) ! && !CHANsleeping(cp)) { ! if (sp->Type == FTchannel) { /* channel feed, try the write */ ! int j; ! if (bp->Left == 0) ! return; ! j = write(cp->fd, (POINTER)&bp->Data[bp->Used], (SIZE_T)bp->Left); ! if (j > 0) { ! bp->Left -= j; ! bp->Used += j; ! i = cp->Out.Left; ! } ! if (bp->Left <= 0) ! WCHANremove(cp); ! else ! WCHANadd(cp); ! } ! else ! WCHANadd(cp); ! } cp->LastActive = Now.time;