🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
13 messages
13 total messages Started by Ronald Hello Wed, 28 Jun 2000 00:00
Still having history problems
#47158
Author: Ronald Hello
Date: Wed, 28 Jun 2000 00:00
39 lines
2040 bytes
Hi,

I still have a problem with taking my incoming feed. At about
16:00h my server gets problems processing it's incoming feed.
The disks look OK, memory is more than sufficient but posting
becomes a problem and my feeds develop backlogs.

I did a bit of reading about history and understand from it
all that with each expire the systems tries to create a new
set of database files with enough spare space to handle the
feed of 1 day. When I look at the sizes, I get the impression
that it doesn't do that very well. At about 2 third of a
daily feed it looks like it runs out of spare space and has
to increase the sizes of the files to process it's feed.

I tried to have a look into the sources, but I can't find
a proper way to increase the default size of the database
files on creation.

So the questions are:
1) Am I on the right track?
2) Does anyone know the right place in the sources to increase
   the files for about 10% on creation?

INN 2.2.2, Solaris 2.6, tradspool, normal history (history,
history.dir, history.hash, history.index). Already played
with hiscachesize.

Regards,

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47139
Author: Russ Allbery
Date: Wed, 28 Jun 2000 00:00
19 lines
1529 bytes
Ronald Hello <hello@cs.utwente.nl> writes:

> I did a bit of reading about history and understand from it all that
> with each expire the systems tries to create a new set of database files
> with enough spare space to handle the feed of 1 day. When I look at the
> sizes, I get the impression that it doesn't do that very well. At about
> 2 third of a daily feed it looks like it runs out of spare space and has
> to increase the sizes of the files to process it's feed.

When you run makehistory for the first time, give it a nice large table
size using something like -s 12000000 (that may be a bit too large; I
don't know how many groups you carry).  Otherwise, it will default to a
fairly small table size and then start overflowing, which hurts
performance badly.

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

Re: Still having history problems
#47169
Author: Russ Allbery
Date: Thu, 29 Jun 2000 00:00
41 lines
2623 bytes
Ronald Hello <hello@cs.utwente.nl> writes:

> That's what I understood of it all. This system is running since
> December. I got the impression it was basing it's new tablesizes on a
> history after expire and was making them too small. My history file is
> 1.4 GB, somewhere between 19000000 and 20000000 lines. I just ran a
> makehistory -r -s 20000000 and the new files are smaller than the old
> ones.

The history file should only be 66% full.  If you've got 20 million lines
in the history file, you want a table size of 30 million.

> I also still have the problem that after two or three weeks cache misses
> start to rise again. After a week or so it decreases to a value under
> 10%, but after three weeks it will get values between 20 and
> 35%. Restarting innd and waiting a week is the only thing that seems to
> help.

This I find completely bizarre, because the history cache has reached a
stable state within a few hours of the server starting.  I can't
understand what would be changing a week or two down the road, let alone
three weeks down the road.

> Cutoff is 14, hiscachesize 16384 and remember is 21.

That's a pretty large cache (16MB; I'm only using 4MB and that's rather
large itself).  But still it's not large enough to hold more than a small
fraction of a day's history, definitely not large enough (I'd think) to
show any variation over a time period of three weeks or more.

> I still don't understand why performance of incoming feed is dropping
> after some 325000 wanted and 100000 unwanted articles. It's somewhere
> around 425000 to 450000 new history entries that it will drop.

Do the history index files suddenly get about twice as large in ls -l
output?

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

Re: Still having history problems
#47170
Author: Ronald Hello
Date: Thu, 29 Jun 2000 00:00
41 lines
2616 bytes
In article <ylem5hj7jj.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
>> I was under the impression that expire runs a makehistory every
>> night again, that's not true?
> 
> It does, but it keeps generating table sizes based on the previous day, so
> they'll continue to be too small until you've gotten a full feed for
> several days and the history size has stabilized.  It's better to start
> with a large size, since the table overflow code isn't something you
> really want to exercise.
> 

That's what I understood of it all. This system is running since
December. I got the impression it was basing it's new tablesizes
on a history after expire and was making them too small. My
history file is 1.4 GB, somewhere between 19000000 and 20000000
lines. I just ran a makehistory -r -s 20000000 and the new
files are smaller than the old ones.
I also still have the problem that after two or three weeks
cache misses start to rise again. After a week or so it
decreases to a value under 10%, but after three weeks it will
get values between 20 and 35%. Restarting innd and waiting a
week is the only thing that seems to help. Cutoff is 14,
hiscachesize 16384 and remember is 21. I put cutoff back on
14 after you said that I probably suffer from old articles
that are offered.

I still don't understand why performance of incoming feed
is dropping after some 325000 wanted and 100000 unwanted
articles. It's somewhere around 425000 to 450000 new
history entries that it will drop.

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47171
Author: Ronald Hello
Date: Thu, 29 Jun 2000 00:00
26 lines
2037 bytes
In article <yllmzohlic.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
> 
>> Feeds with backlogs or with problems keeping up (both offering you
>> articles far too late) seriously damage cache performance.
> 
> Right.  The ideal case is where all of your peers offer the same article
> in close succession, far enough apart to avoid deferrals but otherwise
> within a few seconds of each other.
> 

So I really have to look `outside'. Either for sites with backlogs
(whatever way) or for regular networking problems at the end of the
day and in the evening (local network has no problems of this kind).

Thanks for all the help,

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47176
Author: Russ Allbery
Date: Thu, 29 Jun 2000 00:00
45 lines
2490 bytes
Ronald Hello <hello@cs.utwente.nl> writes:

> Every hiscachesize I tried gave this picture. How large should
> hiscachesize be to hold some 1.000.000 MID's? This all could be a result
> of failing feeds and the variation could be less predictive than I
> think. It's hard to keep an exact log of things that spread over
> weeks. Hmm. I could analise the innreports ...

The cache holds the hash of the message ID (16 bytes) and a boolean, which
is probably padded by your OS to 4 bytes.  So figure 20 bytes per message
ID, so 20,000,000 bytes for 1,000,000 message IDs, or about 20MB.

> I'll keep an eye out for that. I'll make a little timestamp/ls
> script ...
> <clicketyclick>
> done. Now waiting for the makehistory to be able to post this ...
> That's strange.
> Before makehistory -r -s 20000000:
> history.hash:  344842458
> history.index: 229894972
> After makehistory -r -s 20000000:
> history.hash:  267051294
> history.index: 178034196
> An hour later, just before makehistory -r -s 30000000:
> history.hash:  303374862
> history.index: 202249908

This is very not good; the hash and index file sizes should not be
changing.  They should be completely constant between runs of makehistory;
if they aren't, they're too small.

> After makehistory -r -s 30000000:
> history.hash:  270000000
> history.index: 180000000

> wc -l history
> 19403812 history

Yup, 20000000 was definitely too small.  See if the file sizes now remain
constant between nightly runs of makehistory.

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

Re: Still having history problems
#47177
Author: Ronald Hello
Date: Thu, 29 Jun 2000 00:00
38 lines
2615 bytes
In article <ylwvj8hmv0.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
> Ronald Hello <hello@cs.utwente.nl> writes:
> 
>> What's the quality of the cache expiration mechanism?
> 
> It's basically just a straight hash table, where any collision kicks the
> previous entry out.  So it pulls the first X bytes off the front of the
> message ID hash, where X is sufficient to address the entire history
> cache, and stores the message ID hash in that location in the cache.  The
> entire cache is flushed every night when the history file is reloaded
> after expire (or at least that's what it looks like to me).

So you'd expect cache misses to be high in the first few hours after
expire and to drop during the day ... Feeds with backlogs or with
problems keeping up (both offering you articles far too late)
seriously damage cache performance. And the cache has no need for
more entries then some 1.25 to 1.5 times a daily feed (just guessing,
but hash distributions based on this mechanism can't be all bad).
Right?

Apart from some memory consumption, no negative effect are to be
expected from a oversized cahce-size. Do I understand that right?

> (The above addressing is why you want the history cache size to be a power
> of two.)

At last a reason for that ;-)

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47178
Author: Russ Allbery
Date: Thu, 29 Jun 2000 00:00
22 lines
1643 bytes
Ronald Hello <hello@cs.utwente.nl> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> When you run makehistory for the first time, give it a nice large table
>> size using something like -s 12000000 (that may be a bit too large; I
>> don't know how many groups you carry).  Otherwise, it will default to a
>> fairly small table size and then start overflowing, which hurts
>> performance badly.

> I was under the impression that expire runs a makehistory every
> night again, that's not true?

It does, but it keeps generating table sizes based on the previous day, so
they'll continue to be too small until you've gotten a full feed for
several days and the history size has stabilized.  It's better to start
with a large size, since the table overflow code isn't something you
really want to exercise.

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

Re: Still having history problems
#47179
Author: Ronald Hello
Date: Thu, 29 Jun 2000 00:00
76 lines
3757 bytes
In article <ylr99hhqyq.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
> 
> The history file should only be 66% full.  If you've got 20 million lines
> in the history file, you want a table size of 30 million.

New makehistory is running.

>> I also still have the problem that after two or three weeks cache misses
>> start to rise again. After a week or so it decreases to a value under
>> 10%, but after three weeks it will get values between 20 and
>> 35%. Restarting innd and waiting a week is the only thing that seems to
>> help.
> 
> This I find completely bizarre, because the history cache has reached a
> stable state within a few hours of the server starting.  I can't
> understand what would be changing a week or two down the road, let alone
> three weeks down the road.
> 
>> Cutoff is 14, hiscachesize 16384 and remember is 21.
> 
> That's a pretty large cache (16MB; I'm only using 4MB and that's rather
> large itself).

I tried playing around with it and other people told me they
came at this value after playing with it as the best one. And
since I have enough memory in the box ...

> But still it's not large enough to hold more than a small
> fraction of a day's history, definitely not large enough (I'd think) to
> show any variation over a time period of three weeks or more.

Every hiscachesize I tried gave this picture. How large should
hiscachesize be to hold some 1.000.000 MID's? This all could be
a result of failing feeds and the variation could be less predictive
than I think. It's hard to keep an exact log of things that spread
over weeks. Hmm. I could analise the innreports ...

>> I still don't understand why performance of incoming feed is dropping
>> after some 325000 wanted and 100000 unwanted articles. It's somewhere
>> around 425000 to 450000 new history entries that it will drop.
> 
> Do the history index files suddenly get about twice as large in ls -l
> output?

I'll keep an eye out for that. I'll make a little timestamp/ls
script ...
<clicketyclick>
done. Now waiting for the makehistory to be able to post this ...
That's strange.
Before makehistory -r -s 20000000:
history.hash:  344842458
history.index: 229894972
After makehistory -r -s 20000000:
history.hash:  267051294
history.index: 178034196
An hour later, just before makehistory -r -s 30000000:
history.hash:  303374862
history.index: 202249908
After makehistory -r -s 30000000:
history.hash:  270000000
history.index: 180000000
wc -l history
19403812 history

Is this all correct / to be expected?

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47188
Author: Ronald Hello
Date: Thu, 29 Jun 2000 00:00
23 lines
1567 bytes
In article <yl66qts4s9.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
> 
> When you run makehistory for the first time, give it a nice large table
> size using something like -s 12000000 (that may be a bit too large; I
> don't know how many groups you carry).  Otherwise, it will default to a
> fairly small table size and then start overflowing, which hurts
> performance badly.

I was under the impression that expire runs a makehistory every
night again, that's not true?

Any way, I'll try to build a new history. Thanks.

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47189
Author: Russ Allbery
Date: Thu, 29 Jun 2000 00:00
24 lines
1930 bytes
Ronald Hello <hello@cs.utwente.nl> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> The cache holds the hash of the message ID (16 bytes) and a boolean,
>> which is probably padded by your OS to 4 bytes.  So figure 20 bytes per
>> message ID, so 20,000,000 bytes for 1,000,000 message IDs, or about
>> 20MB.

> What's the quality of the cache expiration mechanism?

It's basically just a straight hash table, where any collision kicks the
previous entry out.  So it pulls the first X bytes off the front of the
message ID hash, where X is sufficient to address the entire history
cache, and stores the message ID hash in that location in the cache.  The
entire cache is flushed every night when the history file is reloaded
after expire (or at least that's what it looks like to me).

(The above addressing is why you want the history cache size to be a power
of two.)

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

Re: Still having history problems
#47190
Author: Ronald Hello
Date: Thu, 29 Jun 2000 00:00
36 lines
2165 bytes
In article <yl8zvoj29m.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
> 
> The cache holds the hash of the message ID (16 bytes) and a boolean, which
> is probably padded by your OS to 4 bytes.  So figure 20 bytes per message
> ID, so 20,000,000 bytes for 1,000,000 message IDs, or about 20MB.

What's the quality of the cache expiration mechanism?

> This is very not good; the hash and index file sizes should not be
> changing.  They should be completely constant between runs of makehistory;
> if they aren't, they're too small.
> 
>> After makehistory -r -s 30000000:
>> history.hash:  270000000
>> history.index: 180000000
> 
>> wc -l history
>> 19403812 history
> 
> Yup, 20000000 was definitely too small.  See if the file sizes now remain
> constant between nightly runs of makehistory.

The ls-trace runs once every hour now. I'll let you know how it
behaves.
Thanks for all sofar.

Ronald.

-- 
// Ronald Hello  (newsadmin@cs.utwente.nl)
// University of Twente
// Department of Computer Science
// The Netherlands

Re: Still having history problems
#47194
Author: Russ Allbery
Date: Thu, 29 Jun 2000 00:00
40 lines
2713 bytes
Ronald Hello <hello@cs.utwente.nl> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> It's basically just a straight hash table, where any collision kicks
>> the previous entry out.  So it pulls the first X bytes off the front of
>> the message ID hash, where X is sufficient to address the entire
>> history cache, and stores the message ID hash in that location in the
>> cache.  The entire cache is flushed every night when the history file
>> is reloaded after expire (or at least that's what it looks like to me).

> So you'd expect cache misses to be high in the first few hours after
> expire and to drop during the day ...

Right.

> Feeds with backlogs or with problems keeping up (both offering you
> articles far too late) seriously damage cache performance.

Right.  The ideal case is where all of your peers offer the same article
in close succession, far enough apart to avoid deferrals but otherwise
within a few seconds of each other.

> And the cache has no need for more entries then some 1.25 to 1.5 times a
> daily feed (just guessing, but hash distributions based on this
> mechanism can't be all bad).  Right?

Right.

> Apart from some memory consumption, no negative effect are to be
> expected from a oversized cahce-size. Do I understand that right?

Yup.  And actually, looking at this code right now, you *don't* need a
power of two because it doesn't do quite what I thought it would.  (It
copies the beginning of the message ID hash into an unsigned int and then
takes the modulus relative to the history cache size to get the index.)

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

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