🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #41194

Re: INN maxed? Time to add a Diablo router?

#41194
From: Andrew Gierth
Date: Sat, 30 Oct 1999 00:00
32 lines
2503 bytes
>>>>> "Russ" == Russ Allbery <rra@stanford.edu> writes:

 > Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:
 >> I'm probably going to try this out myself (using a timeout thread
 >> that goes around sending a signal, via pthread_kill, to all the
 >> input threads at some suitable interval). By keeping that signal
 >> blocked in the thread except when actually doing reads & writes,
 >> and not trying to do anything at all in the signal handler, just
 >> using it to force an EINTR return, I think I can keep things clean
 >> enough.

 Russ> Have you had a chance to try this out?

Yes. Though I didn't do it quite like that: my timeout thread doesn't
blindly signal the other threads, but keeps track of pending timeouts
in a heap.

 Russ> I'm curious about the results.

So far, seems reasonable.

The increase in performance (over poll()+read()) is slight, but I'm
going along with this idea anyway because it gives me a specific
feature that I like: the ability to shorten the timeout on the fly
from outside the reading thread. I'm using this to allow shutdown to
be performed within a reasonable time while allowing the timeouts to
be left long during normal operation.

-- 
Andrew.

Technical Details
Message-ID: <873dutip41.fsf@erlenstar.demon.co.uk>
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: <foo-0210991412200001@192.168.2.3> <ylr9jbdsan.fsf@windlord.stanford.edu> <7tb517$bsu$1@newssvr02.news.prodigy.com> <ylpuyuakvk.fsf@windlord.stanford.edu> <37f94ee5$0$7742@news.execpc.com> <7tcv4u$te4$1@nnrp1.deja.com> <brad-0510991640350001@brad.techos.skynet.be> <yl1zb9pmx1.fsf@windlord.stanford.edu> <87k8p1ldpk.fsf@erlenstar.demon.co.uk> <ylso3plcg0.fsf@windlord.stanford.edu> <87yadhjv7d.fsf@erlenstar.demon.co.uk> <ylogdhhg7n.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <873dutip41.fsf@erlenstar.demon.co.uk>
Subject: Re: INN maxed? Time to add a Diablo router?
Date: Sat, 30 Oct 1999 00:00:00 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <foo-0210991412200001@192.168.2.3> <ylr9jbdsan.fsf@windlord.stanford.edu> <7tb517$bsu$1@newssvr02.news.prodigy.com> <ylpuyuakvk.fsf@windlord.stanford.edu> <37f94ee5$0$7742@news.execpc.com> <7tcv4u$te4$1@nnrp1.deja.com> <brad-0510991640350001@brad.techos.skynet.be> <yl1zb9pmx1.fsf@windlord.stanford.edu> <87k8p1ldpk.fsf@erlenstar.demon.co.uk> <ylso3plcg0.fsf@windlord.stanford.edu> <87yadhjv7d.fsf@erlenstar.demon.co.uk> <ylogdhhg7n.fsf@windlord.stanford.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
X-Deja-AN: 542288280
X-Mayan-Date: Long count = 12.19.6.11.17; tzolkin = 11 Caban; haab = 5 Zac
X-Complaints-To: andrew@erlenstar.demon.co.uk
Organization: disorganised
X-Attribution: AG
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-P-Persistent-Headers: are a bad idea.
Newsgroups: news.software.nntp
X-Post-Filter: postfilter v0.6 alpha