🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Russ Allbery Thu, 19 Oct 2000 00:00
Re: Cyclic buffers changing size
#48816
Author: Russ Allbery
Date: Thu, 19 Oct 2000 00:00
20 lines
1372 bytes
Rob Blake <dr.bob@dowcarter.com> writes:

> Has anyone else had a problem with their cyclic buffers changing size
> once the news server is running? I though the whole point of cyclic
> buffers was that they _didn't_ change size! :)

Yes, I've heard about this happening.  I'm not sure what causes it,
though.  My *suspicion* is a defective mmap implementation, but I could be
wrong.

> I've been running inn-2.2.3 under FreeBSD for a couple of months now and
> very few of the cyclic buffers are still the original size. I currently
> have 21 buffers, each roughly 0.5Gb.

How much have they grown by?

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

Re: Cyclic buffers changing size
#48864
Author: Authentic Evil Fluffy
Date: Mon, 23 Oct 2000 23:43
83 lines
4915 bytes
On 53 Sep 19100, Dr. Rob Blake wrote:

> > though.  My *suspicion* is a defective mmap implementation, but I could be
> > wrong.
> 
> Bah! Curse this FreeBSD :-)

Curse *which* FreeBSD?  There have been some mmap changes from the
time it was seriously b0rken, so you can't expect me to rant and
spew and rage against the FreeBSD without telling us which one to
put a curse upon...

I had a FreeBSD box running for some months where the buffers
never exceeded their allocated size, but I may have been running
the precautions described below before I figured out why, although
I'm pretty sure I chose to throw caution to the wind with the
latest INN k0deZ...


> > How much have they grown by?
> Not much. Check out the ls output at the end of this message. They all 
> started off of size 524288000.

There was a problem with overflows in the original CNFS k0dez,
that I'm pretty sure was fixed in the process of creating the
storage API.  Basically, the old k0deZ applied a small fudge
factor to the expected amount to be written before deciding if
the buffer should be cycled or if there was space to spare, but
the thing is that the actual amount returned as written was not
the calculated amount.

My workaround was to give enough free space on the partition to
hold the largest article that the particular buffer there would
expect to see past the end of the buffer, to allow it to overflow.
Interestingly, the small-article buffers never overflowed, while
the large-article buffers would regularly overflow soon, often
several times.

Later I allocated the appropriate amount of space but told INN
in the config that the file was slightly smaller.  Then they
never overflowed past the end.

The reason for this, and I repeat, it was with the older k0deZ,
was that the length of the article was calculated based on the
internal unix size, while when it was written, it was written in
wireformat.  Therefore the article was actually longer in bytes
by the number of lines (to make up for the added CR).  I fixed
this in my own k0deZ by adding the linecount to the fudge and
running some debuggery to show I had given plenty of space.  No
problems since then.

This shouldn't be a problem with newer INN, even though I haven't
verified it in the k0deZ, nor have I looked to see how easily I
could hack the old k0deZ to work with wireformat everywhere and
not break anything.


> -rw-r--r--  1 news  news  524557420 Oct 23 16:19 buff1
> -rw-r--r--  1 news  news  524557755 Oct 23 16:19 buff13
> -rw-r--r--  1 news  news  524556317 Oct 23 16:19 buff14
> -rw-r--r--  1 news  news  524556724 Oct 23 16:19 buff15
> -rw-r--r--  1 news  news  524554332 Oct 23 16:19 buff16
> -rw-r--r--  1 news  news  524557420 Oct 23 16:19 buff19
> -rw-r--r--  1 news  news  524557826 Oct 23 16:19 buff2
> -rw-r--r--  1 news  news  524557794 Oct 23 16:19 buff20
> -rw-r--r--  1 news  news  524557742 Oct 23 16:19 buff21
> -rw-r--r--  1 news  news  524557662 Oct 23 16:19 buff3
> -rw-r--r--  1 news  news  524557702 Oct 23 16:19 buff4
> -rw-r--r--  1 news  news  524556976 Oct 23 16:19 buff5
> -rw-r--r--  1 news  news  524557060 Oct 23 16:19 buff6
> -rw-r--r--  1 news  news  524556713 Oct 23 16:19 buff7
> -rw-r--r--  1 news  news  524550016 Oct 23 16:19 buff8
> -rw-r--r--  1 news  news  524288000 Oct 23 16:19 buff9

Your oversized buffers here are all almost the same size over.
Whereas what I was seeing for the broken-fudge bug was a wide
variety of overflows.  And the size of the overflows is far
more than a linecount, I should hope.

Please say something about your FreeBSD, so that if needed,
someone can scold you and point you to one that works...

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