Thread View: news.software.nntp
2 messages
2 total messages
Started by Miquel van Smoorenburg
Wed, 30 Apr 1997 00:00
GRPscandir
Author: Miquel van Smoorenburg
Date: Wed, 30 Apr 1997 00:00
Date: Wed, 30 Apr 1997 00:00
18 lines
1325 bytes
1325 bytes
I noticed that the nnrpd of inn-1.5.1 does a GRPscandir() for every new group that is entered (ie for every GROUP command, unless that group has been recently visited). That's probably because the active file is only read once and this way the article count is kept up-to-date. That is _really_ expensive! However using the shared mmap patch by Matt Dillon, it should be *much* faster to use the data from the active file instead, right? However the patch doesn't take advantage of that. Is there something I'm overlooking? Mike. -- | Miquel van | "I need more space" "Well, why not move to Texas" | | miquels@cistron.nl | "No, on my account, stupid." "Stupid? Uh-oh.." | | PGP fingerprint: FE 66 52 4F CD 59 A5 36 7F 39 8B 20 F1 D6 74 02 |
Re: GRPscandir
Author: Jan-Pieter Cornet
Date: Wed, 30 Apr 1997 00:00
Date: Wed, 30 Apr 1997 00:00
36 lines
2262 bytes
2262 bytes
In article <5k5rkb$d30$1@enterprise.cistron.nl>, Miquel van Smoorenburg <miquels@news.cistron.nl> wrote: >I noticed that the nnrpd of inn-1.5.1 does a GRPscandir() for every >new group that is entered (ie for every GROUP command, unless that group >has been recently visited). That's probably because the active file >is only read once and this way the article count is kept up-to-date. >That is _really_ expensive! > >However using the shared mmap patch by Matt Dillon, it should be *much* >faster to use the data from the active file instead, right? However the >patch doesn't take advantage of that. Is there something I'm overlooking? Yes. If you replace the GRPscandir with something that says "everything between low and high water marks from the active file is present", then you'll get a performance hit on loops that iterate over all articles and stat() them, as you'll send the kernel hunting for a file that doesn't exist. XOVER does so, for example. So it's a matter of balance: either a small performance hit for every GROUP command (scandir), or a larger performance hit for groups with missing articles and XOVER. Maybe some way to delay running GRPscandir until really necessary would be nice, but that's probably going to be hard to do. Additionally, they should kill the luser that created alt.2600.414. (as this is keeping the alt.2600 low watermark at an artificial low of 414). -- #! ##### Jan-Pieter Cornet ##### <johnpc@xs4all.net> ##### perl ++$_;$!=$_+++$_;($:,$,,$/,$*)=$!=~/.(.)...(.)(.).(.)/;$!=$_+$_; ($@,$\,$~)=$!=~/(.)(.).(.)/; $_="$,$/$:"; $@++; $~="$~$_";($_)= \$$=~/\((.)/;$|=++$_;$_++;$|++;$~="$~ $@$:";`$~$/$\$*$, $|>&$_`
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads