Article View: news.software.nntp
Article #5225Re: Uh, oh...Usenet has got beeg trouble....
From: Jerry Aguirre
Date: Fri, 23 Feb 1996 00:00
Date: Fri, 23 Feb 1996 00:00
96 lines
5322 bytes
5322 bytes
In article <Dn4HrC.KIx@twwells.com> bill@twwells.com (T. William Wells) writes: >In those 19%, 69% of the time was spent in namei calls. I think this point is much overlooked. People talk about write caches and they help somewhat by buffering all writes. But the reads alone are a significant delay. It MUST read to check for a duplicate name, find a free inode and find free blocks. A write cache doesn't help with that. >What does that mean? Well, if an article gets filed under a 100K >directory, perhaps 80K has to be read in, then maybe 8K written >out, and all that *synchronously*. Then again the inode cache >isn't 100% efficient so for the sake of simplicity, I'm going to >pretend that the entire article directory gets read in and that >there are no other relevant times. Just a bit of statistics. For 4633 groups the sum of my DIRECTORY sizes is 32196119 (32 Meg.) for 1.2Meg of articles using 8272394KB (8GigB). I wonder if a process that opened all, or perhaps just the top N in usage, directories and kept them open would help. This would tend to keep at least their inodes in cache. >There is, fortunately, an easy solution. Instead of writing all >the articles into a single directory, write them into >subdirectories. If one got silly, one could a directory level per >digit, which makes the time O(n * log(n)) -- a much more *polite* >number. :-) Interesting idea. Requires changing an awful lot of news readers though unless one absolutely limits reading to NNTP. If your going to change that much then why not convert to my favorite idea. Store the articles by message ID instead of using that damn stupid article number that is purely arbitrary and doesn't port from system to system. To do this efficiently one would still need some kind of hash and subdirectory scheme to keep the sizes practical. But one could divide it evenly based on the total number of articles and not on the vagaries of each news group's volume. If one hashed the message ID so each directory held 127 entries one could store 2 million article in 3 small levels! The NOV files already provide an efficient group and article number to message ID conversion mechanism so readers could convert. No hard or symlinks required for cross posts and no copied files. Outgoing queues would only need the message ID. That would become not only what one sent via "ihave" but also the "path" used to access the article. Expire would remove just the NOV entry until all groups were expired. At that point it would remove the article itself. The saved overhead of not having to do unlinks for every cross post would itself be significant. >The first question that pops into my mind is "just how *big* will >one of those files get?" Well, it could be pretty big. If every >article were 1Meg and there were 1024 of them, we're talking a >gigabyte.... On the other hand, if you're accepting that many huge >articles one hopes that you have some pretty big spool disks.... >So, ignore that problem. With huge files you get into the problem of indirect blocks. Less overhead than the directory stuff though. Same problem with changing news readers to access the new structure. >Expiry works by "cancelling" articles; when all articles are >cancelled, the file goes away. Here's an algorithm, using a >sorted list of files to expire: This is were things start to get really complex. A single article might be kept longer due to an expires header. It could cause the space for the entire file to remain allocated long after all the other articles have expired. Think about a 2K FAQ in a binaries group! You either wind up with a very complex scheme, loose features, waste space, or have to copy the files to compact out deleted entries. Discussions of this type of scheme generally degrade to a very long list of special cases with "just one more" added every time someone thinks of a new issue. > if this is the last of the files, pause the server Or how about just never deleting the last file? >Expiry can be totally divorced from history file processing. The >history file can lose the dates in the middle field and become >nothing more than an index from message ids to files; the data >itself would live just before each article. Some forms of expiry >then become ridiculously easy..... Moving the dates out of the history file is bad. The order expire processes them is simi random so it would have to hop from file to file. Even if it is faster than current it will still be too slow. Not worth it to save 22 bytes/entry.
Technical Details
Message-ID:
<4gl99l$blm@olivea.ATC.Olivetti.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:
<311F8C62.4BC4@pluto.njcc.com> <DMu8B6.6Jn@twwells.com> <Dn4HrC.KIx@twwells.com>Show Full Headers
Complete Article Headers
Message-ID: <4gl99l$blm@olivea.ATC.Olivetti.Com> Subject: Re: Uh, oh...Usenet has got beeg trouble.... Date: Fri, 23 Feb 1996 00:00:00 +0000 From: jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) References: <311F8C62.4BC4@pluto.njcc.com> <DMu8B6.6Jn@twwells.com> <Dn4HrC.KIx@twwells.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: 140777743 Organization: Olivetti ATC; Cupertino, CA; USA Newsgroups: news.software.nntp Summary: File by message ID instead of group/number