🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
120 messages
120 total messages Page 1 of 3 Started by Brian Kramer Mon, 12 Feb 1996 00:00
Page 1 of 3 • 120 total messages
Linux & INN poor performance, help sought.
#4870
Author: Brian Kramer
Date: Mon, 12 Feb 1996 00:00
30 lines
1801 bytes
I've been experiencing real poor performance with Linux and inn and have 
upgraded my machine with little improvement.  Here's what the setup is:

p5-90
64 megs ram
PCI
Buslogic PCI scsi
2 baracuda 4.2 gig drives.  One for alt one for the rest.
1 fujitsu 1 gig for over.view
quantum scsi for /usr/lib/news.
Linux 1.1.12 with ip alias and quota+acct patch.
Inn 1.4sec2 (I've tried the unoffs with no improvement)
3com 509 ethernet

The machine essentially has no interactive logins.  It is used as a web
server, uucp server and news server.

I can only get about 1.5 articles per sec.  This isn't enough to keep
up with the big 7 feed I get.  I did just add some ulimit unlimited 
statements to the rc.news to make sure it wasn't running against memory 
limits (it was, but that didn't help).  My provider says he has plenty 
of sites using inn and cnews that get >3 articles a second.  I have a 
512K FR that is peaking at about 384K usage.  

Any ideas?  I'm stumped.  I've read all the faq's 10 times over, etc.

What's wierd is that INN is only about 10 megs in size in memory...how 
come so small?

Re: Linux & INN poor performance, help sought.
#4872
Author: Mark Hittinger
Date: Tue, 13 Feb 1996 00:00
25 lines
1474 bytes
Brian Kramer <bjkramer@pluto.njcc.com> writes:
>I've been experiencing real poor performance with Linux and inn and have 
>upgraded my machine with little improvement.  Here's what the setup is:
>p5-90 >64 megs ram >PCI >Buslogic PCI scsi
> ...
>3com 509 ethernet
 ^^^^^^^^
99.  Use dos setup disk to set the 3c509 to "client" mode and not "server"
     mode.

1.  Check all scsi termination is removed from all but last device.
2.  Enable disconnection on disk drives in buslogic bios.
3.  Enable 10mb mode on the seagates, possibly on the fujitsu in buslogic bios.
4.  Look at recreating history file (man makehistory [look at -s])
5.  Give plenty of file descriptors to INN.

I ran a news box with similar hardware and FreeBSD :-)

Regards,

Mark Hittinger
Netcom/Dallas
bugs@freebsd.netcom.com

Re: Linux & INN poor performance, help sought.
#4874
Author: Howard Goldstein
Date: Tue, 13 Feb 1996 00:00
37 lines
2128 bytes
On Mon, 12 Feb 1996 18:52:18 +0000, Brian Kramer <bjkramer@pluto.njcc.com> wrote:

 : I can only get about 1.5 articles per sec.  This isn't enough to keep
 : up with the big 7 feed I get.  I did just add some ulimit unlimited 
 : statements to the rc.news to make sure it wasn't running against memory 
 : limits (it was, but that didn't help).  My provider says he has plenty 
 : of sites using inn and cnews that get >3 articles a second.  I have a 
 : 512K FR that is peaking at about 384K usage.  
 : 
 : Any ideas?  I'm stumped.  I've read all the faq's 10 times over, etc.
 : 
 : What's wierd is that INN is only about 10 megs in size in memory...how 
 : come so small?

We have about the same setup here, and the best we do is 75
articles/minute/feed.  "about" may be the operative word because we
are keeping up.  Differences:

1) our feed connects to us with 3 or 4 (I think we're back down to 3)
NNTP connections, alt.* on one, the big 6 on another, and everything
else on the last one.

2) we use unoff2 and its streaming mode support on all of these links.

We had exactly the same problem you did with a feed one hop away; that
feed was clueless and unwilling to help us but with the help of a kind
newadmin we're up to date now.  

Solution #1 comes to me via n.s.n regular Joe St Sauver (hope you're
keeping dry Joe!) who credits John Milburn with the technique.


-- 
Howard Goldstein              <hg@n2wx.ampr.org>     http://www.tapr.org/~n2wx/


Re: Linux & INN poor performance, help sought.
#4908
Author: Dave Barr
Date: Tue, 13 Feb 1996 00:00
13 lines
1082 bytes
In article <311F8C62.4BC4@pluto.njcc.com>,
Brian Kramer  <bjkramer@pluto.njcc.com> wrote:
>I've been experiencing real poor performance with Linux and inn and have 
>upgraded my machine with little improvement.  Here's what the setup is:
>
>Inn 1.4sec2 (I've tried the unoffs with no improvement)

Did the sites who are feeding you try switching to streaming nntp?
If not, then you really didn't give it a fair shake.

--Dave

Re: Linux & INN poor performance, help sought.
#4926
Author: Mike O'Connor
Date: Wed, 14 Feb 1996 00:00
32 lines
2247 bytes
In article <1996Feb14.025914.1@spcvxb.spc.edu>,
Terry Kennedy, Operations Mgr. <terry@spcvxb.spc.edu> wrote:

:  The user says his kernel has a limit of 256 descriptors (presumably per-
:process, and not the system open file limit). I don't know enough about
:Linux to advise (I'm a BSD-ish sort). Similarly, bash reports "unlimited"
:for the data, stack, and max memory limits, but I don't know what the real
:value of "unlimited" is on the system. If it's small (10-16MB) that could
:also be part of the problem.

Linux 1.3 shouldn't need any kernel hacking, beyond getting the devices
to work reasonably.  With Linux 1.2, if you have a lot of feeds, you'll
want to fiddle with listen(), but that's true of a number of OSes, and
not specific to news service.  If their system isn't ACKing 'ihave' in
a reasonable period of time but seems to have enough memory, check out
the disk I/O.  active/history + logs + overview on a single disk will
tend to kill said disk.

:  P.S. - Before anybody says that C News can't cut it, I'd mention that
:UUNET just accepted about 6000 of the last 10000 transit (non-locally
:originated) articles we offered them 8-)

I'd submit that's more reflecting of UUNET's declining news influence
than of the merits of C-News.  :)
 
--
 Michael J. O'Connor                                 Internet: mjo@dojo.mi.org
 InterNIC WHOIS: MJO                                 http://www.coast.net/~mjo

"Do you think God lets you plea-bargain?"                              -Calvin

Re: Linux & INN poor performance, help sought.
#4927
Author: Terry Kennedy, Operations Mgr.
Date: Wed, 14 Feb 1996 00:00
29 lines
2204 bytes
In article <4fqmh4$csd@dodgson.math.psu.edu>, barr@math.psu.edu (Dave Barr) writes:
> Did the sites who are feeding you try switching to streaming nntp?
> If not, then you really didn't give it a fair shake.

  Hi - I'm (well, actually newsN.new-york.net which I manage, is) the feed
for this user. I tried streaming mode using the unoff3 streaming mods and
performance didn't improve. The site is only 25 to 35ms away (ping times on
a loaded link) so streaming should have helped if the problem was link delay.

  I logged into the user's system and did a "telnet localhost nntp" and tried
IHAVE-ing a message-ID locally and saw a noticeable (> 500ms) delay. On other
systems I've tried, the delay is much shorter.

  Also, we feed some other INN systems (as well as C News + NNTP systems) and
get much better performance. Some non-streaming C News sites we feed are doing
> 3.5 articles/second sustained across links with similar delays.

  I know INN is capable of doing better than 1 article/second in non-streamed
mode - if it couldn't, the net would have ground to a standstill before the
streaming mods were released.

  I'll address some specific issues mentioned in a post after this one in my
next followup.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Re: Linux & INN poor performance, help sought.
#4940
Author: bill davidsen
Date: Wed, 14 Feb 1996 00:00
59 lines
2479 bytes
In article <311F8C62.4BC4@pluto.njcc.com>,
Brian Kramer  <bjkramer@pluto.njcc.com> wrote:
| I've been experiencing real poor performance with Linux and inn and have 
| upgraded my machine with little improvement.  Here's what the setup is:

| p5-90
| 64 megs ram
| PCI
| Buslogic PCI scsi
| 2 baracuda 4.2 gig drives.  One for alt one for the rest.
| 1 fujitsu 1 gig for over.view
| quantum scsi for /usr/lib/news.
| Linux 1.1.12 with ip alias and quota+acct patch.
| Inn 1.4sec2 (I've tried the unoffs with no improvement)
| 3com 509 ethernet

If that isn't a typo on the version, you are several years out of
date. I presume you are running 1.2.12.
| 
| The machine essentially has no interactive logins.  It is used as a web
| server, uucp server and news server.
| 
| I can only get about 1.5 articles per sec.  This isn't enough to keep
| up with the big 7 feed I get.  I did just add some ulimit unlimited 
| statements to the rc.news to make sure it wasn't running against memory 
| limits (it was, but that didn't help).  My provider says he has plenty 
| of sites using inn and cnews that get >3 articles a second.  I have a 
| 512K FR that is peaking at about 384K usage.  

I have a 486-80 setup similar to this, and I see article rates of
~2-3/sec from a host with 200ms ping, and ~5 on a local host. That's
far better than you are seeing, and I don't believe the problem is
the Linux box. It would be better is your feed could do streaming
NNTP, of course, but you are still getting very bad performance.

I would expect to find the problem either on the feed side or in the
linkage, but I can't say where.
--
	-bill davidsen (davidsen@tmr.com)
"As a software development model, Anarchy does not scale well."
		-Dave Welch

















Re: Linux & INN poor performance, help sought.
#4941
Author: Chuck Swiger
Date: Wed, 14 Feb 1996 00:00
25 lines
1746 bytes
Brian Kramer <bjkramer@pluto.njcc.com> wrote:
> I've been experiencing real poor performance with Linux and inn and have 
> upgraded my machine with little improvement.  Here's what the setup is:
[ ... ]
> The machine essentially has no interactive logins.  It is used as a web
> server, uucp server and news server.

Whenever someone says they get poor news performance, and I hear that they 
haven't dedicated the machine entirely to news, I get a little suspicious.  A 
busy web site can take up a lot of resources; although UUCP (I assume you 
mean you drive one or more modems off this machine?) shouldn't have much 
effect unless you've got a poor UART and the system has to spend a lot of 
time servicing the serial line(s).

Anyway, I would try running just INN and not the web server or UUCP and see 
whether that makes a performance difference.  The results will help narrow 
down what's going on.

-Chuck

Charles Swiger -- chuck@its.com | Information Technology Solutions, Inc.
--------------------------------+---------------------------------------
CrashCatcher Development, Systems and Networking Administrator

Re: Linux & INN poor performance, help sought.
#4947
Author: Terry Kennedy, Operations Mgr.
Date: Wed, 14 Feb 1996 00:00
28 lines
2137 bytes
In article <4frpsk$q2t@dfw-ixnews1.ix.netcom.com>, bugs@ix.netcom.com (Mark Hittinger) writes:
> 5.  Give plenty of file descriptors to INN.

  The user says his kernel has a limit of 256 descriptors (presumably per-
process, and not the system open file limit). I don't know enough about
Linux to advise (I'm a BSD-ish sort). Similarly, bash reports "unlimited"
for the data, stack, and max memory limits, but I don't know what the real
value of "unlimited" is on the system. If it's small (10-16MB) that could
also be part of the problem.

  Another thing to try would be to investigate the higher-performance Bus-
Logic driver available by anonymous FTP from ftp.dandelion.com.

> I ran a news box with similar hardware and FreeBSD :-)

  I've got several boxes (3, currently) doing major feeding and I know that
the hardware is up to the task. Unfortunately for the user I'm trying to
help, I use BSDI and C News so I don't have a lot of relevant experience.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

  P.S. - Before anybody says that C News can't cut it, I'd mention that
UUNET just accepted about 6000 of the last 10000 transit (non-locally
originated) articles we offered them 8-)

Re: Linux & INN poor performance, help sought.
#4960
Author: Ronan Mullally
Date: Thu, 15 Feb 1996 00:00
17 lines
1363 bytes
Brian Kramer (bjkramer@pluto.njcc.com) writes:
> I've been experiencing real poor performance with Linux and inn and have 
> upgraded my machine with little improvement.  Here's what the setup is:

> limits (it was, but that didn't help).  My provider says he has plenty 
> of sites using inn and cnews that get >3 articles a second.  I have a 
> 512K FR that is peaking at about 384K usage.  

Have you tried streaming NNTP?  The normal NNTP transfer method apparently
isn't the best over a FR link.

-- 
 Ronan Mullally                  'He was so far round the twist you could
 Network Manager                  use him to open wine bottles.'
 Ireland On-Line                     -- Terry Pratchett.

Re: Linux & INN poor performance, help sought.
#4963
Author: Alan Brown
Date: Thu, 15 Feb 1996 00:00
24 lines
1530 bytes
In article <slrn4i1lck.jnl.hgoldste@bbs.mpcs.com>,
Howard Goldstein <hg@n2wx.ampr.org> wrote:

>2) we use unoff2 and its streaming mode support on all of these links.
>
>We had exactly the same problem you did with a feed one hop away; that
>feed was clueless and unwilling to help us but with the help of a kind
>newadmin we're up to date now.  


If the upstream feed isn't using streaming, then the streaming patches 
are no use to you. 

It's more likely that it's the parallel feeding which is keeping your 
head above water.

AB

-- 
"But you can't say they have arrived to classify your nervous lies
 What's right, what's not, what may not be. Don't try your tricky tests on me
 For I won't live in fear my friend - that every day could be my end"

Re: Linux & INN poor performance, help sought.
#4976
Author: bill davidsen
Date: Thu, 15 Feb 1996 00:00
34 lines
2169 bytes
In article <4fthef$h2f@news.its.com>, Chuck Swiger <chuck@its.com> wrote:

| Whenever someone says they get poor news performance, and I hear that they 
| haven't dedicated the machine entirely to news, I get a little suspicious.  A 
| busy web site can take up a lot of resources; although UUCP (I assume you 
| mean you drive one or more modems off this machine?) shouldn't have much 
| effect unless you've got a poor UART and the system has to spend a lot of 
| time servicing the serial line(s).

How about readers? I've seen machines which couldn't feed because of
readers. There's a "nice" option to help the daemon run well and
keep up while the readers see a small drop in performance.

| Anyway, I would try running just INN and not the web server or UUCP and see 
| whether that makes a performance difference.  The results will help narrow 
| down what's going on.

Sounds like a good try, but in the long run I would expect the
system to keep up unless there are a lot of readers. News really
doesn't need that much CPU.

You could also look at the output of ps and see if the innd is
runable. If so that means he's waiting for the cpu. The output of
vmstat will also be useful, at runnable processes, interrupt rates
and context switches.

My guess is that the system is fine, but better to check than
wonder. 
--
	-bill davidsen (davidsen@tmr.com)
"As a software development model, Anarchy does not scale well."
		-Dave Welch

Poor performance with INN and FreeBSD.
#4984
Author: T. William Wells
Date: Thu, 15 Feb 1996 00:00
122 lines
6078 bytes
I have a FreeBSD2.1 box running INN (and related processes) and
our primary nameserver and nothing else; it has the following:

	100 MHz Pentium
	64M RAM
	PCI
	Adaptec 2940 SCSI controller
	Fujitsu M1603-S (system disk)
	2 x Conner CFP4207S (spool disks)
	Digital DC21041 ethernet

This ought to be able to keep up with our two incoming full feeds,
two outgoing partial feeds, and at most a dozen nnrp processes.
Heck, *half* this machine should be able to do that! It doesn't.

I put in a bunch of timing code into the server. Here are the
results. All the times I mention are averages over hourly periods,
except where they are averages over the entire data set.

Here's a typical transaction:

	uunet sends ihave
	network transmits ihave                 20 ms
	inn receives ihave
	inn check for article                   11 ms
	inn sends 335
	network transmits 335                   20 ms
	uunet receives 335
	uunet retrieves article                 ?
	uunet starts sending article
	network transmits start of article      20 ms
	network transmits article               400 ms
	inn receives end of article
	inn processes article                   315 ms
	inn sends 235
	network transmits 235                   20 ms
	uunet receives 235
	uunet retrieves next id to send         ?

I think I have, somewhere, the ? times, but I'm not going to try
to dig them out; for my purposes, their exact values don't matter.
Guessing them each as 11ms (essentially, one disk seek time), the
total time comes to 828 ms. (You may be wondering about the 400ms
article time. Well, if you're getting the binary groups, the
average article is like 12K. Uunet manages to transmit the data
to us at about 30K/sec....)

I think you can see where I'm heading....but just for completeess,
with those numbers, I can expect only 1.2 articles per second.
If the 20ms times are replaced with the 50ms times that are the
estimate from comparing real numbers (specifically, uunet's
measured ihave-to-335 times are 110 ms, my measured check time is
11ms, the 99ms difference gets split into two network transits)
as opposed to ping times, we're talking 1.05 articles/second.
(And the uunet processing times are underestimates...by quite a
lot.) I have a second feed, so I get almost twice that. In fact,
my measured speed varies from 1.5 to 1.9, though I haven't a clue
as to what's causing the variance...network load I'd expect.

Thus: if you have any sort of network latency you are totally,
absolutely fucked (obscenity courtesy of the CDA). If your system
takes any appreciable amount of time to process the article
you're fucked anally, with a sulfuric acid lubricant.

Even if your system manages *zero* processing time, you still are
only going to get 2 articles per second. If you are lucky. The
bottom line is that network latency is going to kill you and no
matter how you beef up your system, you just aren't going to be
able to keep up unless you get rid of the network latency.

Multiple feeds will help. Some. You end up overlapping some of
the network delays on the multiple feeds. But even with the two
feeds I have, I'm still not keeping up....so that's not the
answer, either.

Other scenarios: I could get a faster link. In theory, I get
better than double the speed from my sprintlink connection. That's
because their news machine happens to be just the other side of
my link to them. And the average ihave-ihave time reflects this.
The uunet time is 1052ms; the sprintlink time is 566ms.
Reasonable, given that the 4 round trip times are much smaller and
the bulk transmission rate is much higher.

There are three sets of times involved here. There's time at
uunet, which I'm generously estimating at 22ms. There's local
processing time, of 326ms. There's network time, for uunet either
480ms or 600ms depending on which set of numbers you believe.
The numbers for sprintlink would be 210 or 263 ms. No idea, of
course, what the sprintlink processing time is, but I'd bet
uunet's is better...still, for this swag, I'll use the small
number.

210 ms plus 326 ms plus 22 ms....558ms/article. No *way* that's
going to keep up with today's full newsfeed. Never mind
tomorrow's.

However, at this point, the big number is the local processing
time...and that's subject to local fixes. 315ms *is* excessive.
I could damned near file them manually in that time. :-)

So no matter how you look at it, "things have to change".  You
are going to have to have a feed with low latency and INN is going
to have to process articles faster. The former, I understand, is
addressed by the streaming mode for NNTP. The latter....

I just started working on this. However, I've just spotted a
*really* obvious place for optimization. The very, very largest
times in my kernel traces are when returning from an open call
and that's the time from the namei to the return. Thus, if you
have directories that have, for whatever reason, become very
large, you are going to spend a lot of time doing opens.

Alas, I've done just that -- my junk directory is a quarter
megabyte and I file a fair amount under it. Time to shrink that
directory and keep it small....

Now, I have a question for the FreeBSD gurus out there -- I set
the fragment size to 512 bytes in order to cut down on disk space
waste. I have this sinking feeling that this also ups my directory
read time. What do you think?

Re: Linux & INN poor performance, help sought.
#4992
Author: Jonathan A. Davis
Date: Thu, 15 Feb 1996 00:00
51 lines
3445 bytes
Terry Kennedy, Operations Mgr. (terry@spcvxb.spc.edu) wrote:
:   The user says his kernel has a limit of 256 descriptors (presumably per-
: process, and not the system open file limit). I don't know enough about
: Linux to advise (I'm a BSD-ish sort). Similarly, bash reports "unlimited"
: for the data, stack, and max memory limits, but I don't know what the real
: value of "unlimited" is on the system. If it's small (10-16MB) that could
: also be part of the problem.
: 

Another idea may be to email the BIG-LINUX list at BIG-LINUX@NETSPACE.ORG 
(you might want to subscribe first by sending a subscribe message to 
listserv@netscape.org).  This group deals with issues around large Linux 
installations and I suspect that just about *any* netnews server constitutes 
large.  :-)

Our main campus server is running on a P5/120 with kernel 1.2.13 and INN
1.4 Unoff3.  It has not caused any problems in the 8 months it has operated,
performance or otherwise.  We currently have 5 (mainline) feeds several 
anncilary feeds (special groups, etc...) and run anywhere from 23-65 
simultaneous client connections.

Perhaps (and I didn't see the original post) there is a memory problem.
Nothing saps memory like INN.  And before everyone starts flaming me for 
that remark, I find it is memory well spent.  :-)  A problem we ran into
during initial testing (on a "low" memory machine) is that a low memory
condition would tend to snowball as the initial NNRP process spawned during
a client connection would swap out and not terminate until the client 
disconnected.  This added an extra 1-2MB of memory/swap overhead for each
client connection.  Not good.

One problem is that Linux (in the 1.2 production series) has lousy swapper
code.  An alternative is to run a development kernel (current semi-stable one
seems to be 1.3.57), wait for the 2.0 production kernel release, or install 
the latest kwap patches available for 1.2.13 which improves swap performance 
immeasurably.

The simplest (but most expensive solution) to the above scenario is to upgrade
memory.  If that is indeed the problem with your performance, I would urge this
step as swap space is expensive on performance no matter *how* good your
system deals with it.

Cheers,

-- 
-Jonathan                                                              _  _
------------------------------------------------------------->>>>>>>>-(o)(o)---
 Jonathan A. Davis | Academic Systems Analyst | Hattiesburg/Gulf Park/Stennis
 Computing Center | Box 5171 | 39401 | (601) 266-4103 | jonathan.davis@usm.edu
 http://evergreen.cc.usm.edu/~davis | Linux: The choice of a GNU generation 

Re: Poor performance with INN and FreeBSD.
#5011
Author: Lars Hentschke
Date: Fri, 16 Feb 1996 00:00
19 lines
1456 bytes
T. William Wells (bill@twwells.com) wrote:

: 210 ms plus 326 ms plus 22 ms....558ms/article. No *way* that's
: going to keep up with today's full newsfeed. Never mind
: tomorrow's.
Yes, and it isnt a good way to send article by article. 
I think, that a window-mechanism (like other transmission-protocols)
would be a nice solution under nntp. That must be better then multiple feeds.

: However, at this point, the big number is the local processing
: time...and that's subject to local fixes. 315ms *is* excessive.
: I could damned near file them manually in that time. :-)
Cant this be increasing by compiler-optimization?
(only a "make" in /usr/port/news/inn/ is only -g, i think ...)

Lars.


Re: Poor performance with INN and FreeBSD.
#5029
Author: Brian Tao
Date: Sat, 17 Feb 1996 00:00
28 lines
1828 bytes
In article <DMu8B6.6Jn@twwells.com>, T. William Wells <bill@twwells.com> wrote:
>
>Alas, I've done just that -- my junk directory is a quarter
>megabyte and I file a fair amount under it. Time to shrink that
>directory and keep it small....

    You mean "a quarter _gigabyte_"?  250K for a junk directory is
negligible.  I've got a 22000-group active file, yet I still
accumulate 200 or 300 junk articles a day, adding up to just over a
megabyte.

>Now, I have a question for the FreeBSD gurus out there -- I set
>the fragment size to 512 bytes in order to cut down on disk space
>waste. I have this sinking feeling that this also ups my directory
>read time. What do you think?

    I didn't bother with that here.  The alt.binaries spindle is
really the only one that chews up a lot of disk space, and I have
absolutely no problem trimming its expiry time back.  The other major
top-level hierarchies have 1GB of spool each.  With a 14-day expire, I
doubt any of them will get above 50% in the near future (well, maybe
rec.*).
-- 
Brian Tao (BT300, taob@io.org)
Systems Administrator, Internex Online Inc.
"Though this be madness, yet there is method in't"

Re: Linux & INN poor performance, help sought.
#5034
Author: Howard Goldstein
Date: Sat, 17 Feb 1996 00:00
33 lines
1861 bytes
On 15 Feb 1996 02:34:16 +1300, Alan Brown <alan@papaioea.manawatu.planet.org.nz> wrote:
 : In article <slrn4i1lck.jnl.hgoldste@bbs.mpcs.com>,
 : Howard Goldstein <hg@n2wx.ampr.org> wrote:
 : 
 : >2) we use unoff2 and its streaming mode support on all of these links.
 : >
 : >We had exactly the same problem you did with a feed one hop away; that
 : >feed was clueless and unwilling to help us but with the help of a kind
 : >newadmin we're up to date now.  
 : 
 : 
 : If the upstream feed isn't using streaming, then the streaming patches 
 : are no use to you. 

Since my 300ms-distant feeder streams, I find streaming mode quite
helpful :-)

 : 
 : It's more likely that it's the parallel feeding which is keeping your 
 : head above water.

Surely it is a substantial factor in our success, but I don't know if
anyone can render odds on this one.  If I were to go non streaming
certainly I'd need one or two more NNTP feeds just to get back to the
status quo ante.  That wouldn't be a very resource-friendly thing to
do to my feeder.


-- 
Howard Goldstein              <hg@n2wx.ampr.org>     http://www.tapr.org/~n2wx/


Re: Linux & INN poor performance, help sought.
#5043
Author: Brian Kramer
Date: Sun, 18 Feb 1996 00:00
55 lines
3058 bytes
Chuck Swiger wrote:
> 
> davidsen@tmr.com (bill davidsen) wrote:
> > [ ... ]
> > How about readers? I've seen machines which couldn't feed because of
> > readers. There's a "nice" option to help the daemon run well and
> > keep up while the readers see a small drop in performance.
> 
> Good suggestion.  The INN FAQ has a lot more useful advice, which the
> original person asking the question should look over.

What is the "nice option"?  The poor performance however was occuring even at 5 in the morning
with no readers...so I doubt that't it.

> 
> (I was attempting to address the question with specific suggestions, since
> the FAQ has a lot to say...perhaps too much material for a person unfamiliar
> with the subject to digest easily.  :-)
> 
> >> Anyway, I would try running just INN and not the web server or UUCP
> >> and see whether that makes a performance difference.  The results will
> >> help narrow down what's going on.
> >
> > Sounds like a good try, but in the long run I would expect the
> > system to keep up unless there are a lot of readers. News really
> > doesn't need that much CPU.


> 
> News doesn't need much CPU most of the time, sure.  But if the system in
> question was running a bunch of web server processes it could well be having
> resource contention for memory or disk I/O, especially if the web server
> documents are located on a drive that's being used by the news server.

I did, stopped the web server, no difference.  It's on another drive.


I did make some progress over the weekend.  I made the following changes:

1) Patched inn to use the newer dbz available in cnews.
2) Cleared my spool and started fresh (there was bad history record that was giving me problems) and
it would take me longer to rebuild the history than start fresh.


So far we are processing between 2-4 articles a second.  We'll see if it keeps up when the drives
get fuller.


-- 
Brian Kramer - Owner/Systems Administrator - bjkramer@pluto.njcc.com
New Jersey Computer Connection - Public Access Unix Site - pluto.njcc.com
Voice: 609-896-2799 - Fax: 609-896-2994 - Dialups: 609-896-3191 & 896-2722
Web: http://www.njcc.com/  Telnet/Dialup: pluto.njcc.com login as guest.

Re: Poor performance with INN and FreeBSD.
#5052
Author: Rashid Karimov
Date: Sun, 18 Feb 1996 00:00
60 lines
2641 bytes
	Hi there folx,

T. William Wells (bill@twwells.com) wrote:
: I have a FreeBSD2.1 box running INN (and related processes) and
: our primary nameserver and nothing else; it has the following:

: 	100 MHz Pentium
: 	64M RAM
: 	PCI
: 	Adaptec 2940 SCSI controller
: 	Fujitsu M1603-S (system disk)
: 	2 x Conner CFP4207S (spool disks)
: 	Digital DC21041 ethernet

	I have P-6 200Mhz with 2G and 9G  Seagates
	and Adaptec 2940( not wide).

	There used to be problems with Usenet before I've upgraded
	to inn1.4.secunoff3 - this version literally flies comparing
	to the old inn1.4.sec I used to have.
	I beleive it's mostly 'cause of streamlined mode.

	For example , I used to have ~340K articles total in
	~13.000 newsgroups( with 3 days expiration) , now , on the 
	third day after upgrade , it's ~560K.

	Do not even try to invest into more HDs, adapters and stuff,
	w/o upgrading first to this version of INN.


	If you're getting a single newsfeed , or you have one which
	feeds you  99% of articles , try to get in the batch mode.

: This ought to be able to keep up with our two incoming full feeds,
: two outgoing partial feeds, and at most a dozen nnrp processes.
: Heck, *half* this machine should be able to do that! It doesn't.

	My system here  runs 4 incoming newsfeeds ( oh boy , one has
	to see it when all 4 of them start feeding the system here :),
	and ~7-8 outgoing newsfeeds.

	The readers peak at ~250  ,load averages are between 0.3 - 1.0


	The only problem :))) ( it's pretty damn serious one IMHO) is
	that somehow now it takes much more time to get connected to 
	the news machine via reader.
	I dont know why , because old inn was fater in this sense.
	I'll probably try to put old nnrpd in the place to see if 
	it will be faster.

	I don't see any serious overload in the system, the's no
	complains from innd in the log files, etc ...


	Rashid


Re: Linux & INN poor performance, help sought.
#5057
Author: Chuck Swiger
Date: Sun, 18 Feb 1996 00:00
36 lines
2266 bytes
davidsen@tmr.com (bill davidsen) wrote:
> [ ... ]
> How about readers? I've seen machines which couldn't feed because of
> readers. There's a "nice" option to help the daemon run well and
> keep up while the readers see a small drop in performance.

Good suggestion.  The INN FAQ has a lot more useful advice, which the 
original person asking the question should look over.

(I was attempting to address the question with specific suggestions, since 
the FAQ has a lot to say...perhaps too much material for a person unfamiliar 
with the subject to digest easily.  :-)

>> Anyway, I would try running just INN and not the web server or UUCP
>> and see whether that makes a performance difference.  The results will
>> help narrow down what's going on.
> 
> Sounds like a good try, but in the long run I would expect the
> system to keep up unless there are a lot of readers. News really
> doesn't need that much CPU.

News doesn't need much CPU most of the time, sure.  But if the system in 
question was running a bunch of web server processes it could well be having 
resource contention for memory or disk I/O, especially if the web server 
documents are located on a drive that's being used by the news server.

-Chuck

PS: Speaking of the INN FAQ and web servers-- I think that an HTML version of 
the INN FAQ would be a Good Thing.  Anyone interested?

Charles Swiger -- chuck@its.com | Information Technology Solutions, Inc.
--------------------------------+---------------------------------------
CrashCatcher Development, Systems and Networking Administrator

Re: Poor performance with INN and FreeBSD.
#5099
Author: Brian Tao
Date: Tue, 20 Feb 1996 00:00
15 lines
1216 bytes
In article <4gd5fh$oeg@ratatosk.uio.no>, Odd Einar Aurbakken <o.e.aurbakken@usit.uio.no> wrote:
>
>I think you misunderstand. The _directory_ is 250KB. (ls -ld /.../junk).
>Heavy traffic groups have big directories, misc.jobs.offered is now
>1.1MB on my poor machine :-(

    Oh, I *did* misunderstand then. :-/  My misc/jobs/offered/
directory is 280K now, with 17054 articles in it.  Just how many days
do you keep that group?!?  :)
-- 
Brian Tao (BT300, taob@io.org)
Systems Administrator, Internex Online Inc.
"Though this be madness, yet there is method in't"

Re: Poor performance with INN and FreeBSD.
#5103
Author: Odd Einar Aurbakken
Date: Tue, 20 Feb 1996 00:00
22 lines
1510 bytes
In article <4g5pa5$oii@zip.io.org>, taob@zip.io.org (Brian Tao) writes:
> In article <DMu8B6.6Jn@twwells.com>, T. William Wells <bill@twwells.com> wrote:
> >
> >Alas, I've done just that -- my junk directory is a quarter
> >megabyte and I file a fair amount under it. Time to shrink that
> >directory and keep it small....
> 
>     You mean "a quarter _gigabyte_"?  250K for a junk directory is
> negligible.  I've got a 22000-group active file, yet I still
> accumulate 200 or 300 junk articles a day, adding up to just over a
> megabyte.

I think you misunderstand. The _directory_ is 250KB. (ls -ld /.../junk).
Heavy traffic groups have big directories, misc.jobs.offered is now
1.1MB on my poor machine :-(

Tracing innd show that open normally takes 400-800ms for the big groups.
Unfortunately a lot of the traffic is in the big groups...

[-oea]Pq

Re: Poor performance with INN and FreeBSD.
#5106
Author: Jerry Aguirre
Date: Tue, 20 Feb 1996 00:00
48 lines
3382 bytes
In article <DMu8B6.6Jn@twwells.com> bill@twwells.com (T. William Wells) writes:
>I think you can see where I'm heading....but just for completeess,
>with those numbers, I can expect only 1.2 articles per second.

Yes, the limit of conventional NNTP is one article for every 2*RTT.
This is because each transfer requires two exchanges, one to send the
ihave and another to send the article.  Each waits for the response so
the link is idle.

In practice the timing is worse as just about everything adds to it.
If the history lookup for the ihave requires a disk read, either directly
or as a result of swapping, then that delay hangs all other incomming
processing.  The open and read on the sending system, create, and the
write on the receiving, each hang everything until complete.  The links
for cross posted articles also take considerable time.

The answer to that was streaming NNTP.  It sends several articles ahead
before waiting for responses.  This keeps the incomming buffer full so
the server always has something ready to process.

The disk IO delays are another problem though.  As you have noticed the
bigger the directory the more overhead.  My misc.jobs.offered is nearly
half a meg (for the directory, not the articles).  It has over 22,000
entries.  Ever new article requires Unix to scan that directory and
compare every existing article name to the new one.  That really cranks
up the CPU usage.  Then there is the overhead of finding a free spot,
inode, and disk blocks.

A hardware write cache helps a little but not with much of the
overhead.  The writes are already buffered so the savings is with the
file create itself.  But it does nothing to help with scanning a large
directory.  Also when the file is created Unix still probably needs to
read the disk to find a free inode and to allocate the data blocks.

These reads block innd.  During that time no other incomming feeds are
processed.  What I have been thinking about is having innd set up N
(configurable) channels to "innwd" programs.  When an article was ready
to be written to disk a free innwd channel would be used to send the
article pathnames and data.  The innwd would do the actual create and
write to disk.  In this way innd could be doing other things, rejecting
duplicates, reading in the next article, etc. while the innwd was
blocked on disk IO.  With more than one innwd dividing up the load there
could be more than one simultainious IO request at a time.  This would
allow overlapping more article creations especially where the spool was
split across multiple drives.  The down side to this would be greater
CPU consumption as the data would be copied from innd to innwd.

Re: Linux & INN poor performance, help sought.
#5109
Author: Phil Howard
Date: Tue, 20 Feb 1996 00:00
34 lines
2662 bytes
pm@zetnet.co.uk  (Paul Martin) wrote:
>In <31273D61.53D4@pluto.njcc.com>, Brian Kramer <bjkramer@pluto.njcc.com> writes:

>Avoid using IDE drives for anything, spool or history (unless you can do
>hdparm -u1 successfully). Also, distribute your drives across many SCSI
>buses.

I've found IDE drives perform equally well compared to SCSI, provided 
that you choose your IDE interface (it's not a controller; the controller 
is on the drive) wisely.  Better SCSI will outperform most IDE and better 
IDE will outperform most SCSI.  I've found the WD 31600 drive to be 
faster than an ST12400N, but not as fast as the ST12550N, for example.  
Wide SCSI is likely to be an overall winner.

Although IDE can perform, it is less rugged.  They are not designed for 
continuous use as a news server and that is the principle reason I 
recommend SCSI; you get industrial class drives (and lots of cheap ones 
there, too).

But drives alone do not speed things up.  Spreading out the work in 
parallelism will help a lot.  Multiple drives is better than one, and 
multiple SCSI busses is better than multiple drives on one bus.  Having 
multiple filesystems gets to be a balancing headache, but if you go with 
a RAID array to get a single filesystem, avoid small stripe chunks as 
that will put many drives in seek motion for each file written.  A chunk 
size around 4 meg or so would be a lot better.  Simple appending the 
disks sequentially would be fine if the filesystem tends to balance the 
usage of the cylinder groups well.  News disks will be seeking a lot (and 
generating a lot of extra heat as a result) so you want to avoid having 
multiple drives doing the same seek in parallel.  Tuning parameters that 
apply to other types of systems do not all apply to news.


Re: Linux & INN poor performance, help sought.
#5116
Author: Paul Martin
Date: Tue, 20 Feb 1996 00:00
18 lines
1324 bytes
In <31273D61.53D4@pluto.njcc.com>, Brian Kramer <bjkramer@pluto.njcc.com> writes:

>I did make some progress over the weekend.  I made the following changes:
>
>1) Patched inn to use the newer dbz available in cnews.
>2) Cleared my spool and started fresh (there was bad history record that was giving me problems) and
>it would take me longer to rebuild the history than start fresh.

Avoid using IDE drives for anything, spool or history (unless you can do
hdparm -u1 successfully). Also, distribute your drives across many SCSI
buses.


-- 
Paul Martin <pm@zetnet.co.uk>


Re: Linux & INN poor performance, help sought.
#5131
Author: David Miller
Date: Wed, 21 Feb 1996 00:00
51 lines
3405 bytes
Phil Howard (phoward@sunsrv11.clr.com) wrote:
: pm@zetnet.co.uk  (Paul Martin) wrote:
: >In <31273D61.53D4@pluto.njcc.com>, Brian Kramer <bjkramer@pluto.njcc.com> writes:

: >Avoid using IDE drives for anything, spool or history (unless you can do
: >hdparm -u1 successfully). Also, distribute your drives across many SCSI
: >buses.

: I've found IDE drives perform equally well compared to SCSI, provided 
: that you choose your IDE interface (it's not a controller; the controller 
: is on the drive) wisely.  Better SCSI will outperform most IDE and better 
: IDE will outperform most SCSI.  I've found the WD 31600 drive to be 
: faster than an ST12400N, but not as fast as the ST12550N, for example.  
: Wide SCSI is likely to be an overall winner.

I'm skeptical about this.  With news there tend to be lots of short IO's 
for directory lookups and queuing of/for other feeds as well as article 
IO. A fast SCSI bus carries 10MB/sec, so you'd need to be doing 
simultaneous IO on at least 3 drives before scsi bandwidth became a 
problem:) 

: But drives alone do not speed things up.  Spreading out the work in 
: parallelism will help a lot.  Multiple drives is better than one, and 
: multiple SCSI busses is better than multiple drives on one bus.  Having 

Do you have any real evidence of this?  I'm not flaming - really - but I 
see it as conventional wisdom and wonder if there are any stats to back 
it up.  Anecdotal evidence anyone?

: multiple filesystems gets to be a balancing headache, but if you go with 
: a RAID array to get a single filesystem, avoid small stripe chunks as 
: that will put many drives in seek motion for each file written.  A chunk 
: size around 4 meg or so would be a lot better.  Simple appending the 
: disks sequentially would be fine if the filesystem tends to balance the 
: usage of the cylinder groups well.  News disks will be seeking a lot (and 
: generating a lot of extra heat as a result) so you want to avoid having 
: multiple drives doing the same seek in parallel.  Tuning parameters that 
: apply to other types of systems do not all apply to news.

I agree with not wanting to make multiple spindles seek to retrieve a 
single file as a general rule, but keep in mind that most reads are of 
very short length - a couple K max for a directory lookup, and the avg 
article size is around 2K depending some on your balance of alt.binaries 
to everything else.  I think 4MB is awfully high for a stripe size:)



--
David Miller			Usual disclaimers apply

Re: Poor performance with INN and FreeBSD.
#5132
Author: Geert Bosch
Date: Wed, 21 Feb 1996 00:00
18 lines
1439 bytes
Jerry Aguirre (jerry@strobe.ATC.Olivetti.Com) wrote:
: My misc.jobs.offered is nearly half a meg (for the directory, 
: not the articles).  It has over 22,000 entries. Every new article 
: requires Unix to scan that directory and compare every existing 
: article name to the new one.  

Is it *really* true that FreeBSD still uses a file-system with linear 
directories? For these kind of things B-tree's (or similar structures) 
are *far* more efficient. Is there a better file-system for FreeBSD
than the default FFS?

Greetings,
  Geert
-- 
E-Mail: geert@sun3.iaf.nl      ***   Lbh whfg penpxrq ZvpebFbsg'f   ***
 Phone: +31-53-4303054         **  arj naq vzcebirq frphevgl flfgrz. **

Re: Linux & INN poor performance, help sought.
#5135
Author: Chuck Swiger
Date: Wed, 21 Feb 1996 00:00
33 lines
2056 bytes
Brian Kramer <bjkramer@pluto.njcc.com> wrote:
> davidsen@tmr.com (bill davidsen) wrote:
>> How about readers? I've seen machines which couldn't feed because of
>> readers. There's a "nice" option to help the daemon run well and
>> keep up while the readers see a small drop in performance.
[ ... ]
> What is the "nice option"?  The poor performance however was occuring
> even at 5 in the morning with no readers...so I doubt that't it.

Edit the config/config.data file from the INN source distribution:

##  Should sub-processes get a nice(2) value?  Pick DO or DONT.
#### =()<INND_NICE_KIDS         @<INND_NICE_KIDS>@>()=
INND_NICE_KIDS          DONT
##  Value for nice(2) call in innd.
#### =()<INND_NICE_VALUE        @<INND_NICE_VALUE>@>()=
INND_NICE_VALUE 0

...and change as you wish according to the INN documentation, the FAQ,
Usenet advice, and anything else you wish to pay attention to.

> I did, stopped the web server, no difference.  It's on another drive.

That's useful to know.  How big is the pipeline between you and
your feeder(s) in terms of bandwidth and latency?

-Chuck

Charles Swiger -- chuck@its.com | Information Technology Solutions, Inc.
--------------------------------+---------------------------------------
CrashCatcher Development, Systems and Networking Administrator

Magic NNTP speedup (was Re: Uh, oh...Usenet has got beeg trouble....)
#5140
Author: Mike Bird
Date: Wed, 21 Feb 1996 00:00
27 lines
1795 bytes
With two servers (one fed from MCI and one from Sprint) with single
spool spindles we simply sort the batch file (by newsgroup name in
*reverse* order) in NNTPSEND before starting INNXMIT for our cross
feeds.  Instant huge improvement in directory caching!  An extension
to this - either using multiple INNXMIT's or another INNXMIT patch -
will handle additional spindles if I can ever keep the other four gig
drives from taking vacations at Micropolis.

With Jerry Appling's streaming patches and some additional
enhancements to work avoid (Linux) TCP hangs and improve streaming
we're easily handling a full feed over 7 hops on one SCSI spool
spindle.  (Overview, history and log are on an IDE spindle.)  (We have
relatively few readers.)

Wouldn't it be great if NNTPng included some method to tell the
upstream server which newsgroups we want and break them down by
spindle?  :)

--Mike

----------------------------------------------------------
 Mike Bird          Tel: 209-742-5000   FAX: 209-966-3177
 President          POP: 209-742-5333   NOC: 209-742-9979 
 Iron Mtn Systems      http://www.ims.mariposa.ca.us/


Re: Magic NNTP speedup (was Re: Uh, oh...Usenet has got beeg trouble....)
#5141
Author: John Stewart
Date: Wed, 21 Feb 1996 00:00
18 lines
1591 bytes
In <4gfvge$jjd@news.ims.mariposa.ca.us> mgb@ims.mariposa.ca.us (Mike Bird) writes:

>With two servers (one fed from MCI and one from Sprint) with single
>spool spindles we simply sort the batch file (by newsgroup name in
>*reverse* order) in NNTPSEND before starting INNXMIT for our cross
>feeds.  Instant huge improvement in directory caching! 

I've done this too but with a slight twist -- I send all the control messages
first.  Since some of the control messages may be cancellations of articles
still in the queue this can save bandwidth since the remote machine should
refuse the articles when they are offered.
-- 
John Stewart -- Computing and Communications Services, Carleton University
Internet: jstewart@ccs.carleton.ca                       613-520-2600x3707
Freenet related queries: xx104@freenet.carleton.ca
let it snow, let it snow, LET IT SNOW!!!

Re: Uh, oh...Usenet has got beeg trouble....
#5143
Author: Ryan Brooks
Date: Wed, 21 Feb 1996 00:00
17 lines
1140 bytes
In article <Dn4HrC.KIx@twwells.com> bill@twwells.com (T. William Wells) > 
>
>In those 19%, 69% of the time was spent in namei calls.
> 
> The more I think about it, the more this isn't surprising. First
> of all, the inode cache only applies to the directory component of
> pathnames. The final element, because it is almost always a link
> being created, results in a complete search of the directory.
> 

Sounds like we almost need a "dumber" or less robust filing system for the  
news spool?   Any options?

Ryan Brooks
ryan@inc.net

Uh, oh...Usenet has got beeg trouble....
#5147
Author: T. William Wells
Date: Wed, 21 Feb 1996 00:00
280 lines
13211 bytes
The good news: running the stream patches (where are the latest,
btw?) has improved matters for my installation. So also did
setting the active sync time to once every 100 articles. The bad
news: My closest provider, sprintlink, only connects to me 68% of
the time. This is truly horrible. As it is, it looks like if
*nothing* goes wrong, I'll eventually catch up to real time. I
give no odds on *that* happening. :-|

So, I'm back to looking for ways to speed up my server.

I did a little statistics gathering. The way I did this was to
time from select to select and divide them into two groups: those
with a namei call and those without. 19% of them had a namei call.
Presumably only those 19% were relevant to new article creation.

In those 19%, 69% of the time was spent in namei calls.

The more I think about it, the more this isn't surprising. First
of all, the inode cache only applies to the directory component of
pathnames. The final element, because it is almost always a link
being created, results in a complete search of the directory.

Thus, any caching comes from the buffer cache. As I recall, the
buffer cache uses LRU -- and this just doesn't work well for what
is essentially random access to the disk. Not unless the "working
set" (so to speak) of active directories happens to fit in your
buffer cache. Fat chance.

Thus, for all practical purposes, each new article requires
reading the entire directory it gets filed in. Sure, the buffer
cache helps *some* (there is no obvious way to find this info in
my OS, so I have no real numbers) but it's surely not going to be
a drastic improvement. Maybe 20%.

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.

So, what does this amount to? Well, the probability of an article
being in a given newsgroup is (assuming equal expire times, a bad
assumption, but the point is to get a feel for the impact of this,
not precise mathematics) proportional to the size of the
directory. And the amount of data transferred is also.... The
average data to be transferred is:

	sum(over all newsgroups, p[article in newsgroup] *
		size of directory)

That probability is, roughly, just the size of the directory
divided by the total of all directory sizes, thus the average data
to be transferred by the directory read is:

	sum(over all newsgroups, size of directory * size of directory)
	---------------------------------------------------------------
	sum(over all newsgroups, size of directory)

Now, before getting into the actual numbers, it's worth thinking
about that formula. The number you get there scales linearly with
the size of the newsfeed -- but it applies to each and every
article filed. That means that the data transfered for a newsfeed
proportional to the *square* of the size of the newsfeed!

If you're getting a sinking feeling, you're right on the money.

So what are the actual numbers like? Well, the average article is
12K. (It's only 3K if you aren't getting the binaries.) The block
size (on many Unix systems, anyway) is 4K and I'll pretend that
two of those are written per article. And then for the above
number....

44,560 bytes

That's right. 12K+8K+44K or 64K per article. At today's rate,
that's 128K per second. *If* you aren't doing anything else with
the machine. Like updating the history, log, or active files....

In short, in the not too distant future, you'd better be running
some *very* fast disks, and forget about caching because it won't
help, or you are completely, totally screwed.

The bottom line is that the current news spool structure is going
to become obsolete. It requires O(log(n)*n**2) (the log(n) comes
from the article number size) bytes transferred per article. While
newsgroup reorganization helps some, by keeping down the size of
the individual directories (and thus pushing forward the time to
doomsday), it's a sure bet that it'll hit a limit all too soon.
And I haven't even talked about the latency effects....

Besides which, it is entirely foolish to be spending two thirds of
your disk bandwidth on directory diddling, when it just isn't
necessary.

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. :-)

Realistically, a million articles is extreme. So, divide the
article number into 7+3 digits and write the articles into
.../0123456./789 . If you have a very small newsgroup, you do one
extra directory search. If you have a very large, say million
article, newsgroup, you search 2000 entries instead of a million.

So how would this fare on my newsfeed? Well, *every* article now
has an extra directory read. A typical directory entry has 8 bytes
of overhead and there are 8 bytes of data in the first level. So a
4K block can contain 64 entries or 64000 articles.... There are
not many groups that large... in fact, at the moment, there are
none. So, 4K it is, per file, like it or not.

Then, the average subdirectory is 5.3K, call it 6K for the sake of
round numbers. This is a total of 10K for the lookup; add another
4K for the directory write and 12K for the article... the result
is 26K, which compares favorably with 64K. :-) And, unlike that
latter number, it is essentially fixed; it doesn't increase until
there are newsgroups with over 64000 articles. On top of that, the
synchronous part goes from 44K to 14K and that directly affects
the performance of feeds that don't use streaming. (Or even those
that do: I rather expect that the server gets stuck waiting during
those writes....)

Nothing comes for free, of course. Everything that accesses the
news spool must now know about the new directory structure. The
NNTP daemon, whatever it is, must know to create the extra level
of directories, and expire must know to delete the directories
when they're no longer needed.

The thought then crosses my mind that, perhaps, it's time to go
whole hog and just use a file where the subdirectory would be.
This is reasonable *if* one can build a "directory" in this file
that is more efficient than the system's.

Obviously, if a full directory were being implemented, one would
have all the headaches that come with trying to implement that.
However, as with dbz, it's possible to implement just a subset
functionality, as news doesn't require all the features....

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.

The next problem is that file system writes are not synchronous.
That means data inconsistencies are a problem. Actually not, but
I'll explain shortly....

So, here's a very simple structure:

1001 4 byte entries, each containing an offset to an article. The
list of articles is terminated with a zero offset. The very last
entry is a sentinel entry, so there are no more than 1000 articles
in the file. A cancelled article is marked by a single bit in the
offset. This is the low bit; articles start on 4 byte boundaries.
Each article starts with 4 bytes of size and is followed by the
article itself. There is no article terminator. The first article
starts at byte 4096; thus there is space after the index for
random other purposes.

Now, to create an article, these are the steps:

	open the file
	read the index block
	find the entry
	if the entry is in use
		{the active file lost some entries}
		trash that entry and all successors
		truncate the file to the end of the last article
	if preceeding entries are not in use
		mark them as cancelled
	put the file size into the entry
	write the block
	seek to the end of the file
	write the article size
	write the article, possibly with padding
	close the file

On a crash, it's "OK" to lose some articles. You're going to
anyway, as, for example, the active file is likely to not have
been synced. What's needed is the ability to restore consistency
after a crash. This is pretty easy, fortunately. You find the end
of the file and zero out all block entries that point at or past
it. Then you look at the last entry and make sure that it's
consistent with the article size. If not, you zero it and back up
one. You don't need to worry about the active file; if the active
file got updated first, you have unused entries; otherwise, the
file gets cleaned up during article creation.

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:

	if this is the last of the files, pause the server
	open the file
	read the index block
	mark all articles to be expired
	if there are no active entries
		delete the file
	else
		write the index block
	close the file
	if the server is paused, unpause it
	{alternately, instead of pausing the server, feed it a
	    bunch of cancel commands}

One subtletly in cancellation. Because there can be any number of
readers on a file, you can't go diddling with the contents.  You
can, however, make a copy of the file, edited however one might
like, and then rename the copy to the file. This works because
there are no operations that depend on the state of the file
across a close/open sequence. (The one exception to this,
truncating when out of sync with the active file, works because
no attempt will be made to access the articles beyond the
truncation point.)

The server cancels an article:

	open the file
	read the index block
	mark the article to be cancelled
	write the index block
	close the file

There is a presumption here, that even though an article is
cancelled, its history entry sticks around until expiry. That's
needed because only expire deletes these files.

Finally, there's reading an article

	open the file
	read the index block
	seek to the article start
	read the article size
	read just that many bytes from the file

That's it. This is not too complex, though it is certainly more
complex than the current arrangement. You can't grep these files
with impunity, either. Nor likely edit them. But those are
relatively minor annoyances. Heck, the grep problem can largely be
ignored by having a fifth character before the article start, a
newline. Then, at worst, you grep some binary garbage along with
the text you want. The edit problem can be resolved by storing the
material before each article in ASCII and putting the article
number in there; then you can just drop the 4K header, edit the
ASCII, and reconstitute the header with a simple utility.

Finally, you flat out lose on crossposts. You get a copy of each
cross-posted article. (On the plus side, no more worries about
links.) In compensation for this, articles use less space than
they used to: the overhead is not a half a block per article (plus
inode information) but a handful of bytes.

On the other hand, you get enormous performance benefits. Creating
a new article generally does not involve synchronous writes nor
humongous directory searches. Newsgroups will get too large for
human consumption before they get too large for this system to
handle.

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.....

About the only major drawback to this whole scheme is that every
newsreader that does direct spool access has to be modified. On
the other hand, reading is trivial. And, in many installations, it
just doesn't matter -- all reading is done via nntp anyway.

Now, the $64,000 questions: Have I missed something that would
make this scheme unworkable? Is someone doing this? Would the
maintainers of INN be willing to have this as a compile-time
option?

Re: Magic NNTP speedup (was Re: Uh, oh...Usenet has got beeg trouble....)
#5150
Author: Mike Bird
Date: Thu, 22 Feb 1996 00:00
20 lines
1383 bytes
Mark Delany <markd@mira.net.au> wrote:

>mgb@ims.mariposa.ca.us (Mike Bird) writes:

>>With two servers (one fed from MCI and one from Sprint) with single
>>spool spindles we simply sort the batch file (by newsgroup name in
>>*reverse* order) in NNTPSEND before starting INNXMIT for our cross

>How does reverse order help especially?

Kludge to give non-binaries preference if/when a backlog builds up.

--Mike
----------------------------------------------------------
 Mike Bird          Tel: 209-742-5000   FAX: 209-966-3177
 President          POP: 209-742-5333   NOC: 209-742-9979 
 Iron Mtn Systems      http://www.ims.mariposa.ca.us/


Re: Uh, oh...Usenet has got beeg trouble....
#5158
Author: Dave Barr
Date: Thu, 22 Feb 1996 00:00
16 lines
1284 bytes
In article <Dn5KLH.Muy@twwells.com>, T. William Wells <bill@twwells.com> wrote:
>Some versions of Unix allow directory writes to be nonsynchronous.
>That would speed things up somewhat. The downside is that after a
>crash, you could well have a file system that fsck could not fix.

Please don't start this religious war again.  There ARE UNIX
filesystems (ext2 for Linux) which allow async updates of metadata
while still maintining filesystem integrety.  This is done by
careful ordering of metadata and data writes.

Sure, turning on async updates on FFS is dangerous, because FFS
wasn't designed for it.

--Dave

Re: Linux & INN poor performance, help sought.
#5163
Author: Jerry Aguirre
Date: Thu, 22 Feb 1996 00:00
51 lines
3562 bytes
In article <4gfft9$998@web.ddp.state.me.us> isdmill@gatekeeper.ddp.state.me.us (David Miller) writes:
>I agree with not wanting to make multiple spindles seek to retrieve a 
>single file as a general rule, but keep in mind that most reads are of 
>very short length - a couple K max for a directory lookup, and the avg 
>article size is around 2K depending some on your balance of alt.binaries 
>to everything else.  I think 4MB is awfully high for a stripe size:)

Getting a single file sounds like a single seek and read.  But consider
the overhead needed to get the file.  First there is all the directory
traversal to find out the inode number.  Then there is the read to get
the inode.  Then, finally, you can actually read the file.  Yes, the
system is supposed to cache things but news accesses so very much data
in such a random manner that it is unlikely the specific directory and
inode you need is cached.

So the file may be just a few consecutive sectors in one cylinder but
the overhead items may be spread across a larger area.  The UFS (AKA
Berkeley fast file system) has logic to try and group directories,
inodes, and files by cylinder groups.  It would seem prudent to stripe
based on this behavior.

I suggest that the best stripe size for news articles is a cylinder
group.  This should evenly balance the load except for slightly higher
accesses to the first spindle for superblock updates.  Also cylinder
group stripes will increase the chance that a single spindle can
service a single request.  This would leave other spindle free to
service other requests.  The objective is to minimize the number of
seeks as they are more typically the limiting factor.

To put it another way, if "most reads are of very short length" then
what is the disadvantage of using a large stripe size?  What is your
reason for thinking "4MB is awfully high"?

Based on personal experience concatenation is not that good.  The files
seem to fill from the beginning so the first spindle gets all the
activity.  As the file system fills subsequent spindles are used.
I notice that the last spindle gets accessed very little and only
when the file system fills so full that it is forced to use it.
I would have striped but the logistics of setting this up forced me
to start small and growfs.  Redoing it is probably a couple of days
down time.  At least I don't have to balance space between 5 separate
filesystems anymore.

I would suggest that for anyone who is going to concatenate and has
different size drives that they put the smallest drive first and
the largest drive last.  The first drive gets more accesses for
super blocks and such so this is offset if it has less data on it.
The biggest drive will get more accesses as it has more blocks so
making it the last will tend to offset that.

Re: Magic NNTP speedup (was Re: Uh, oh...Usenet has got beeg trouble....)
#5170
Author: Mark Delany
Date: Thu, 22 Feb 1996 00:00
13 lines
1143 bytes
mgb@ims.mariposa.ca.us (Mike Bird) writes:

>With two servers (one fed from MCI and one from Sprint) with single
>spool spindles we simply sort the batch file (by newsgroup name in
>*reverse* order) in NNTPSEND before starting INNXMIT for our cross

How does reverse order help especially? Or are you saying that the
last 'n' articles (or directory buffers) are likely to be still in
memory? Where 'n' is a usefully large number.

Regards.

Re: Poor performance with INN and FreeBSD.
#5171
Author: J Wunsch
Date: Thu, 22 Feb 1996 00:00
19 lines
1513 bytes
geert@fozzie.sun3.iaf.nl (Geert Bosch) writes:

> Is it *really* true that FreeBSD still uses a file-system with linear 
> directories? For these kind of things B-tree's (or similar structures) 
> are *far* more efficient. Is there a better file-system for FreeBSD
> than the default FFS?

BSD uses a filesystem with linear directories, but the directory
contains just an pointer to the i-node information (unlike e.g. OS/2,
where the directory contains the equivalent of an i-node itself).

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


Re: Poor performance with INN and FreeBSD.
#5178
Author: T. William Wells
Date: Thu, 22 Feb 1996 00:00
33 lines
2165 bytes
In article <4g5pa5$oii@zip.io.org>, Brian Tao <taob@zip.io.org> wrote:
: In article <DMu8B6.6Jn@twwells.com>, T. William Wells <bill@twwells.com> wrote:
: >
: >Alas, I've done just that -- my junk directory is a quarter
: >megabyte and I file a fair amount under it. Time to shrink that
: >directory and keep it small....
:
:     You mean "a quarter _gigabyte_"?  250K for a junk directory is
: negligible.

I meant the directory proper. It takes a *long time* to create a
file in a quarter megabyte directory -- the entire thing has to
be searched to make sure the file doesn't already exist.

: >Now, I have a question for the FreeBSD gurus out there -- I set
: >the fragment size to 512 bytes in order to cut down on disk space
: >waste. I have this sinking feeling that this also ups my directory
: >read time. What do you think?
:
:     I didn't bother with that here.  The alt.binaries spindle is
: really the only one that chews up a lot of disk space, and I have
: absolutely no problem trimming its expiry time back.

I do that too. But that wasn't what I mean. The average non-binary
file is 3K. The default allocation size is 1K. For each article,
one can expect half of a block of waste. Thus 1/6 of one's spool
space -- on the non-binary groups -- goes to waste. If the block
size is halved, so also is this waste. So, by changing this
parameter, one saves 8% of the spool space. (In theory. I've done
measurements in the past and they're at least in the same ball
park.)

Re: Poor performance with INN and FreeBSD.
#5181
Author: T. William Wells
Date: Thu, 22 Feb 1996 00:00
25 lines
1659 bytes
In article <4gf2p0$209@fozzie.sun3.iaf.nl>,
Geert Bosch <geert@fozzie.sun3.iaf.nl> wrote:
: Is it *really* true that FreeBSD still uses a file-system with linear
: directories?

Yes, it uses a linear directory.

: For these kind of things B-tree's (or similar structures)
: are *far* more efficient.

And a whole lot more *fragile*. Remember, that a file system
needs to be stable under such outrages as pulling the plug and bad
disk blocks; it should also have a hope of surviving things like
buffering disk controllers that defeat the purpose of synchronous
writes....

Not to mention that for many purposes, the efficiency improvement
of more complex directory structures is negligible or even
negative -- the cost of dicking with the structure can outweigh
the order-of-magnitude improvement.

I've set followups to comp.unix.bsd.freebsd.misc only as this is
no longer relevant to the nntp group.

Re: Uh, oh...Usenet has got beeg trouble....
#5197
Author: T. William Wells
Date: Thu, 22 Feb 1996 00:00
16 lines
1373 bytes
In article <4gfi22$evb@news.inc.net>, Ryan Brooks <ryan@ned.inc.net> wrote:
: In article <Dn4HrC.KIx@twwells.com> bill@twwells.com (T. William Wells) >
: >In those 19%, 69% of the time was spent in namei calls.
: > The more I think about it, the more this isn't surprising. First
: > of all, the inode cache only applies to the directory component of
: > pathnames. The final element, because it is almost always a link
: > being created, results in a complete search of the directory.
:
: Sounds like we almost need a "dumber" or less robust filing system for the
: news spool?   Any options?

Some versions of Unix allow directory writes to be nonsynchronous.
That would speed things up somewhat. The downside is that after a
crash, you could well have a file system that fsck could not fix.

Re: Poor performance with INN and FreeBSD.
#5199
Author: T. William Wells
Date: Thu, 22 Feb 1996 00:00
9 lines
985 bytes
In article <4gdj69$f4s@zip.io.org>, Brian Tao <taob@zip.io.org> wrote:
:     Oh, I *did* misunderstand then. :-/  My misc/jobs/offered/
: directory is 280K now, with 17054 articles in it.  Just how many days
: do you keep that group?!?  :)

I keep (non-binary) groups that people are reading for 30 days.
Misc.jobs is one of the more popular hierarchies....

Re: Uh, oh...Usenet has got beeg trouble....
#5225
Author: Jerry Aguirre
Date: Fri, 23 Feb 1996 00:00
96 lines
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.

Re: Uh, oh...Usenet has got beeg trouble....
#5238
Author: Evan Champion
Date: Sat, 24 Feb 1996 00:00
47 lines
2921 bytes
jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) wrote:
>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 only major problem I could see is that most readers read by
article number and not by message ID.  You'd almost need to keep a
translation table between the message ID and a fake article number to
keep those newsreaders happy, and then have the NNTP V2 RFC specify
that news readers must retrieve by message ID.

In addition, you'd probably (need|want) to set an official message ID
format because of those programs that create enormous/bizarre message
IDs.

On the plus side, because article numbers wouldn't be used, you
wouldn't need to worry about renumbering after a crash (which can take
a while on a large spool).  You could remove the high/low water mark
from the active file, which would reduce memory requirements (about
50% smaller on my active file).

It would also solve the problem of storing a spool across disks; you
wouldn't get in to the headaches of symlinks, and maybe INN could be
setup with something to "load balance" incoming articles across
multiple disks; because it would no longer matter where an article was
written as long as INN knows where to find it, you wouldn't need to
buy a RAID setup to be able to get a large spool without symlinks.

I'm just thinking of all the nifty stuff that could be done and it is
a pretty exciting idea.  It would be a lot of work but if it all
worked out I think the end result would be worth it.

If you were going to give it a try, I have no local readers on my
system (all done via NNTP) and I'm always looking for ways to improve
performance so I'd be willing to help you test it.

Evan



How to do a better USENET file system
#5259
Author: Brad Templeton
Date: Sun, 25 Feb 1996 00:00
54 lines
3450 bytes
It's not hard to do a more efficient USENET file system.

You just take chunks of raw disk (block devices).  You need a "free"
list when it starts, but in truth once running there is no free list, just
a list of the "oldest" (least desired) articles.

When a new article (or article batch if you want to be real efficient)
comes in, you scan the list of oldest articles for one near the end that
is of similar or slightly larger size.  You do some blocking to make this
very likely to be an old article.    And you then thwap your new article,
or batch, down on top of that old article.   A single seek and a single
write call.   Then you record the seek address in an overview/header
database that you are building elsewhere, either on your raw disk or in
the real filesystem.

Big articles are the only problem, though there are enough of them that
this will probably work if you are willing to block big articles to larger
and larger blocksizes.   That wastes an amount of disk, but the disk
saving of the above scheme (which can probably block articles to within
16 bytes) is so immense that a little wastage on the big boys is no problem.

Or, you can put big articles in the real filesys, or you can support
non-contiguous big articles.  Not exacty hard, but the above system
is darn close to trivial.

No free list.  No expire.  All the disk always used fully.  Old articles
disappear as new ones come in and over-write them.   All articles written
with a single seek and write, and read with a single seek and read, plus
occasional block writes to the overview database.  (With luck you can
cache enough of that in ram so you write it out a block at a time or during
idle periods on your disk at the end of batches.  It's ok if you wait a
few minutes before the article "appears" live.   For the outgoing batches
you don't need the overviews, you just write out a log file with message-ids
and seek addresses, and let your feeder read that)

Of course you have to write an NNTPD to read from this, and some debug
tools to let people poke around articles manually.  But you simply can't
get any more efficient than this without going to some fancy caching.

(With a fancy cache, you can try to group articles, so that you do only
one seek and write for groups of articles, and quite possibly, also for
feeding.)

You can keep the "oldest" article list as a stream calculated as articles
come in, or you can write a program that recalcs it at night so that you
can tune parameters as you wish even after the fact.

This system can never run out of disk space unless you allow mega-huge
articles, it is always exactly full, but efficiently so.
-- 
Brad Templeton, publisher, ClariNet Communications Corp.	 info@clari.net
The net's #1 E-Newspaper (1,200,000 paid sbscrbrs.)  http://www.clari.net/brad/

Re: How to do a better USENET file system
#5267
Author: Evan Champion
Date: Mon, 26 Feb 1996 00:00
20 lines
1418 bytes
brad@clarinet.com (Brad Templeton) wrote:

>You just take chunks of raw disk (block devices).  You need a "free"
>list when it starts, but in truth once running there is no free list, just
>a list of the "oldest" (least desired) articles.

I like having news on a regular filesystem.  It makes maintenance
relatively easy, and I can use all my favourite UNIX utils on it.  The
only really good use I see for application-level raw disk access is in
commercial database servers on platforms that can't handle large disk
slices.  Even there, however, I see a trend away from using raw disk
partitions because on newer UNIXen and disk technology the performance
boost from using raw partitions does not justify the "pain in the ass"
factor :-)

Evan



Re: How to do a better USENET file system
#5290
Author: Mark Delany
Date: Mon, 26 Feb 1996 00:00
16 lines
1031 bytes
brad@clarinet.com (Brad Templeton) writes:

>It's not hard to do a more efficient USENET file system.

[Interesting explanation of a news file system deleted.]

>This system can never run out of disk space unless you allow mega-huge
>articles, it is always exactly full, but efficiently so.

Sort of like a perpetually pre-loaded cache really. Maybe it should be
viewed as a cache?


Regards.

Tuning lookups/namei cache (was: Re: Uh, oh...Usenet has got beeg trouble....)
#5292
Author: Anthony D'Atri
Date: Mon, 26 Feb 1996 00:00
26 lines
1703 bytes
>>In those 19%, 69% of the time was spent in namei calls.

>I think this point is much overlooked.

I'm well aware of it, but details on configuring a kernel to handle it
appropriately are scarce for many OS's.  Sun provides a certain amount of
tuning information for their OS, but it's radically different from the BSDI
machines on which we're running news, and doesn't mention NOV, so I don't
know if I should double their recommended settings to account for overchan.
I set maxusers huge to increase various things including maxvnodes, which
currently ends up being 4642 (>5000 groups carried).  I'd love to see
some discussion on proper tuning.  The above BSDI 2.0.1 machine currently
reports

 12563332 total name lookups
          cache hits (41% pos + 0% neg) system 35% per-process

while an unmodified 1.1 machine with ~16k groups reports

156933891 total name lookups
          cache hits (68% pos + 0% neg) system 6% per-process

Am I just wasting my time?


Re: How to do a better USENET file system
#5304
Author: Brad Templeton
Date: Tue, 27 Feb 1996 00:00
54 lines
2933 bytes
In article <LOC.4gssas$1h1@piano.synapse.net>,
Evan Champion <evanc@synapse.net> wrote:
>brad@clarinet.com (Brad Templeton) wrote:
>
>>You just take chunks of raw disk (block devices).  You need a "free"
>>list when it starts, but in truth once running there is no free list, just
>>a list of the "oldest" (least desired) articles.
>
>I like having news on a regular filesystem.  It makes maintenance
>relatively easy, and I can use all my favourite UNIX utils on it.  The
>only really good use I see for application-level raw disk access is in
>commercial database servers on platforms that can't handle large disk
>slices.  Even there, however, I see a trend away from using raw disk
>partitions because on newer UNIXen and disk technology the performance
>boost from using raw partitions does not justify the "pain in the ass"
>factor :-)

You "like" this at a vast cost.   News is really different from files:

	a) News articles are written once and never change size.
	b) There is no need for a free list, block allocation, or
	   fragmentation
	c) News articles are written in one big write, they do not grow
	   during creation


Right now you pay the tremendous cost to get an article:

	a) Open directory chain down to article directory, opening many
	   directory inodes and reading directories.
	b) Read large article directory file.  Find inode of file
	c) Read inode.
	d) Go to blocks, possibly fragmented, and read them

Writing is even more expensive.

The alternate -- direct from the overview database or history database
(depending on whether lookup is by messageid or article number) then one
seek and one contiguous block read -- is so much vastly more efficient
that you would gladly give up the convenience.

Besides, you can get it back in a couple of ways:

	a) Write a series of tools that do things like article-cat
	   and article rm given an old style path

	b) If you want to really do it, write a filesystem handler that
	   creates a read or unlink only filesystem with the articles, and
	   then even old readers will work.
-- 
Brad Templeton, publisher, ClariNet Communications Corp.	 info@clari.net
The net's #1 E-Newspaper (1,200,000 paid sbscrbrs.)  http://www.clari.net/brad/

Re: How to do a better USENET file system
#5311
Author: Bill Davidson
Date: Tue, 27 Feb 1996 00:00
78 lines
4933 bytes
In article <DnCo3D.Cz3@clarinet.com>, Brad Templeton <brad@clarinet.com> wrote:
>It's not hard to do a more efficient USENET file system.

Maybe harder than you think.

>When a new article (or article batch if you want to be real efficient)
>comes in, you scan the list of oldest articles for one near the end that
>is of similar or slightly larger size.  You do some blocking to make this
>very likely to be an old article.    And you then thwap your new article,
>or batch, down on top of that old article.   A single seek and a single
>write call.   Then you record the seek address in an overview/header
>database that you are building elsewhere, either on your raw disk or in
>the real filesystem.

The thing is, I've gotten used to the relatively modern convenience of
expire times based upon group name/hierarchy.  At my site, local groups
and comp.unix* get 7 days.  alt.binaries and comp.binaries get 0.75
days.  The rest of comp gets 3 days and everything else gets 2 days.  I
like this ability very much.  Things more relevant to our business are
available for longer and frivolous or trival junk wastes as little
space as I can get away with without getting rid of it altogether.

>Of course you have to write an NNTPD to read from this, and some debug
>tools to let people poke around articles manually.  But you simply can't
>get any more efficient than this without going to some fancy caching.
>
>(With a fancy cache, you can try to group articles, so that you do only
>one seek and write for groups of articles, and quite possibly, also for
>feeding.)

Any new storage system that doesn't look like the current group-names-
into-directory-names method is going to need a new nntpd/nnrpd.  I
don't see that as being as much of a big deal as figuring out what
really is the best way to do it.

I like the idea of expiring as news comes in to keep the disk usage
maximal but it kind of makes it hard to maintain flexibility in the
expiry.  I suppose your system could do this if you set an expire
time based upon a configuration file in your list of files as they
came in.  The list could be sorted by expire date which ends up being
more of a suggestion than an actual expire date.

I think volume has gotten to the point that it is probably getting
close to time for the database experts and the news experts to get
together and figure out a better way to store news; probably by
designing a news specific file system.  I've got almost 800
subdirectories at the top level of alt.  I've got several groups with
over 1000 articles.  Lookups on these have got to be inefficient with a
standard ufs.

Brian Kantor suggested to me several years ago that news really needs
file system designed specifically for it rather than a standard ufs.
Ufs wastes a lot of space when you have lots of small articles.
Articles are not grouped well and resultant heavy seeking causes a
decrease in performance and in disk lifespan.  Ufs doesn't span
multiple disks well though many systems can now stripe or concatenate
disks.  It'd be nice if the news system could simply be told to use
disks x, y, and z without the mess of stripes etc.  This would also
allow you to lose a disk and only lose the news on that disk; you could
keep the news on remaining disks.  With stripes and concats you
generally lose the whole thing and hardly anybody's crazy enough to
back up a news spool partition anymore.  All those small files take too
long to back up and too long to restore.  Even though news is not
really that important, it still sucks when you lose it all.

All of the big database companies have taken to making their own file
systems for performance reasons.  Why not news?  Of course, the big
database companies have a lot of resources to design these things.
USENET only has volunteers.  I get the impression that not that much
work is even being done on the two major systems anymore (Cnews/nntpd &
INN).  Somebody will have to put a lot of time into this and integrate
it into at least one of these systems (preferably INN, which seems to
be the future of USENET transport).  I think it will be a while before
someone is willing to really do this.

--Bill Davidson

Re: How to do a better USENET file system
#5315
Author: Brad Templeton
Date: Tue, 27 Feb 1996 00:00
51 lines
3491 bytes
In article <LOC.DnEyLn.39G@cray.com>, Bill Davidson <billd@cray.com> wrote:
>The thing is, I've gotten used to the relatively modern convenience of
>expire times based upon group name/hierarchy.  At my site, local groups
>and comp.unix* get 7 days.  alt.binaries and comp.binaries get 0.75
>days.  The rest of comp gets 3 days and everything else gets 2 days.  I

NOt a problem.  As noted, there is simply a list of the "least desired"
articles.   You pull "free" blocks from the head of that list.  You can
build the list any way you want, scoring articles based on age, newsgroup,
poster, presence of dirty words, article size, you name it.  Once you score
them you sort the list based on score, and use that as your list.

You only need to do the sort once a day or so, until you have enough items
on the list to handle the most news you might get in a day.
(Or you simply program the system to stop, and rebuild the list if you
ever run out of items.)   If you want to expire some groups in .2 days then
you do need to sort it fairly often, but sorting a list is not that expensive.
The list is just seek addresses and file device codes, you can easily sort
2 million items in ram on a typical machine in a fairly short time.

Or, if you are that concerned, you can code the system to just automatically
promote items with certain scores directly to a mini-list that is
merged into the main list as you go.  You caught onto this below.

>I think volume has gotten to the point that it is probably getting
>close to time for the database experts and the news experts to get
>together and figure out a better way to store news; probably by
>designing a news specific file system.  I've got almost 800
>subdirectories at the top level of alt.  I've got several groups with
>over 1000 articles.  Lookups on these have got to be inefficient with a
>standard ufs.

I don't think it's like a database problem, although database people have
spent lots of time trying to make their systems efficient.

News is unlike other databases.   Stuff goes in one end and goes out
the other, the goal being to use a fixed amount of disk space.  Records
are *never* updated, they are always written in one big thwap, then either
re-used when they expire or deleted due to cancel.


Somebody willing to write a news transport could do this easily.  The
system I describe is really quite simple.  In particular, you can shove
the "hard" problems to the real filesys if you want, as long as they
do not take up much of the load.   Ie. put the growing, changing active
file and growing history or log files in the regular filesys if you want to.
-- 
Brad Templeton, publisher, ClariNet Communications Corp.	 info@clari.net
The net's #1 E-Newspaper (1,200,000 paid sbscrbrs.)  http://www.clari.net/brad/

Re: Uh, oh...Usenet has got beeg trouble....
#5384
Author: bill davidsen
Date: Thu, 29 Feb 1996 00:00
14 lines
1238 bytes
In article <4gl99l$blm@olivea.ATC.Olivetti.Com>,
Jerry Aguirre <jerry@strobe.ATC.Olivetti.Com> wrote:

| Interesting idea.  Requires changing an awful lot of news readers
| though unless one absolutely limits reading to NNTP.

I think that idea has a lot of currency right now.
--
	-bill davidsen (davidsen@tmr.com)
Behavioral scientists at Harvard University have proven that there
are six things a man must do to keep a woman happy. They have also
determined that no one has any idea what these things are.

Page 1 of 3 • 120 total messages
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