🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Nickolai Zeldovich Sun, 07 Nov 1999 00:00
dexpireover and locked files
#41359
Author: Nickolai Zeldovich
Date: Sun, 07 Nov 1999 00:00
20 lines
1377 bytes
I've been playing with Diablo's reader, and ran into an interesting
problem: it seems that the reader hflock()'s the over.* files that
clients request, but dexpireover needs to hflock() the over.* file
with XLOCK_EX (exclusive?) in order to resize the group. If the resize
doesn't happen, overview data gets lost (I'm not sure if it just fails
to be written, or cycles over the oldest entries). With a large number
of readers which are reading high-traffic groups, this becomes somewhat
problematic if the group increases in volume and needs to be resized.

What do people do in these cases? Kill dreaderd for a "clean" run of
dexpireover once every two weeks or so? This doesn't seem particularly
appealing.. Along the same lines but less of a problem is cleaning the
dactive.kp file.

TIA,

Nickolai Zeldovich.


Re: dexpireover and locked files
#41388
Author: Nickolai Zeldovich
Date: Tue, 09 Nov 1999 00:00
32 lines
2207 bytes
In article <VikV3.3334$rK2.226378@ptah.visi.com>, Mike Horwath wrote:
>I've been seeing the same thing, and don't have an idea yet.

What I did temporarily is to run dexpireover at the lowest-usage time
of the day (which is probably a good idea regardless), and modify the
dreaderd code to close all overview cache file handles every 30 secs.
Performance doesn't get affected much by this, and this seems like it
would work at least for some lower-load servers. It doesn't get around
the overview files being open by the feeder forks, but hopefully those
collisions will be semi-random and the overview file will eventually
get resized.

Another thing I noticed is that dhistory file trimming prevents the
reader from getting any articles. I think it would be useful to add
some sort of a 'read-only' mode where incoming feeds will be dropped
as they are now, but connections from the reader will stay active and
will be able to use dhistory to retrieve articles in read-only mode.
(Any article postings would get an error message, most likely, or the
reader could be configured to use another machine as a backup outgoing
host). When didump/diload finishes, the master process could kill all
reader connections, re-read the new history file, and un-pause. The
20 minutes to reload a 500MB dhistory just seems like a rather long
outage that could be avoided.

The above (read-only dhistory mode) is just an idea; I don't have it
implemented (yet). Anyone happen to have this already done in some way
or another?

-- Nickolai Zeldovich.


Re: dexpireover and locked files
#41425
Author: Nickolai Zeldovich
Date: Tue, 09 Nov 1999 00:00
20 lines
1483 bytes
In article <akXV3.4078$rK2.292624@ptah.visi.com>, Mike Horwath wrote:
>If the reader forks have them open read-only, why can't dexpireover
>update the files?

Because dexpireover needs an exclusive (aka write) lock on over and
data files in order to rewrite them. Reading those files in the middle
of a rewrite will give inconsistent information.

>Kind of weird, the dreaderd could be updated easily enough (guess I'll
>have to try it :) to watch for an update to occur.

I suppose some sort of cooperation could be implemented between dexpireover
and dreaderd, such that dexpireover will ask dreaderd to release any read
locks if it runs across some file it cannot write-lock.. Would be a nice
feature to have.

-- Nickolai Zeldovich.


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