Article View: news.software.nntp
Article #39940Re: news spool area exported from NFS
From: Chris Adams
Date: Thu, 16 Sep 1999 00:00
Date: Thu, 16 Sep 1999 00:00
30 lines
2296 bytes
2296 bytes
Once upon a time, Russ Allbery <rra@stanford.edu> said: >Well, for one thing, given the Cyclone interface to the Perl filters, you >have to make at least two complete copies of the article to get it to the >filter. (One into kernel memory or something equivalent to write it to >the pipe and one back from there into user memory in the filter to read it >from the pipe.) Well, I believe that some work was done under Linux to reduce copying through a pipe (I think they were doing some mapping tricks to avoid copying unless necessary). I don't know for sure if the results are in the production kernels, but I think they are. And I'm sure that if Linux is doing it, FreeBSD either did it first, does it now, or will do it soon! :-) Another way to avoid this may be to use shared memory. Set up a shared memory area and use that to buffer articles. Send an index (or some type of message) through a pipe to the filter and let it read the article from the shared memory and send a message back to the news server. Poof: zero copies! Now, implementing this in perl would be kind of tricky, since I'm not sure you can directly read shared memory without copying it into perl variables. Still, you'd save some work (the news server would not do any copying). -- Chris Adams <cmadams@hiwaay.net> Systems and Network Administrator - HiWAAY Information Services I don't speak for anybody but myself - that's enough trouble.
Technical Details
Message-ID:
<8i_D3.14024$N77.1030540@typ11.nn.bcandid.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-mailReferences:
<7rhmg7$gmh$1@coco.singnet.com.sg> <ru0bmrro1iv15@news.supernews.com> <brad-1609990210150001@dialup880.brussels2.skynet.be> <ylwvtrk8ps.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <8i_D3.14024$N77.1030540@typ11.nn.bcandid.com> Subject: Re: news spool area exported from NFS Date: Thu, 16 Sep 1999 00:00:00 +0000 From: cmadams@fly.hiwaay.net (Chris Adams) References: <7rhmg7$gmh$1@coco.singnet.com.sg> <ru0bmrro1iv15@news.supernews.com> <brad-1609990210150001@dialup880.brussels2.skynet.be> <ylwvtrk8ps.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: 525719332 X-Trace: typ11.nn.bcandid.com 937455876 208.147.154.56 (Thu, 16 Sep 1999 00:24:36 EDT) Organization: HiWAAY Information Services NNTP-Posting-Date: Thu, 16 Sep 1999 00:24:36 EDT Newsgroups: news.software.nntp