Thread View: news.software.nntp
7 messages
7 total messages
Started by Marcus Needham
Wed, 22 Oct 1997 00:00
c-nocem undermining history cache?
Author: Marcus Needham
Date: Wed, 22 Oct 1997 00:00
Date: Wed, 22 Oct 1997 00:00
25 lines
1720 bytes
1720 bytes
I notice that Jeff Garzik's history cache patch's cache is cleared when innd is paused and the history file closed (and I think Clayton O'Niell's is too). Running c-nocem this happens on my news server every 10-30 minutes or so which seems to me to undermine the usefulness of the cache somewhat. Is it strictly necessary to wholly flush the cache? If article entries have been deleted during the pause (by expire for example) then if the cache indicates we still have them then its not a big loss because we don't want them again anyway if offered. If articles have been added during the pause (by c-nocem's fastcancel adding entries for example), and the cache indicates we do not have them then there IS a problem because we would accept the articles that c-nocem is trying to save us from. But what is only the "don't have" cache entries were purged when the history file is reopened? Would the extra time involved checking each cache entry in turn be worth it for the number of "have" items that can be retained? // Marcus Needham // Internet Operations Manager, The River Internet \\ marcus@theriver.com \\ Access Co., Tucson AZ. http://www.theriver.com/
Re: c-nocem undermining history cache?
Author: Marcus Needham
Date: Thu, 23 Oct 1997 00:00
Date: Thu, 23 Oct 1997 00:00
27 lines
2142 bytes
2142 bytes
In article <86pvowi893.fsf@blah.erols.com>, coneill@blah.erols.com wrote: >marcus@theriver.com (Marcus Needham) writes: >And what if you just added a bunch of message-id's that you have >cached as "don't have". You're screwed in that instance. You have to >keep the cache coherent with the on disk history, and the only way to >do that is to invalidate the cache on reload or revalidate it on >reload. I think most people would prefer to invalidate it. If you >come up with another solution, feel free to submit the code. I do, or at least I think I do. My original suggestion was to sweep item by item through the history cache when the history file is closed, keeping all "haves" and discarding all "don't haves." I implemented this yesterday, and I have observed that only a handful of entries are discarded each time. For midnight to 9am this morning for example my server was paused 46 times (mainly by c-nocem) and on average only 144 articles (out of approx 64k) were dropped from the cache each time. This makes sense because almost every time you add a "don't have" to the cache in normal operation the article is accepted very soon thereafter and the entry changed to "have." I am not an inn hacker (yet) though so that's why I am seeking opinions on the idea from those in the know. // Marcus Needham // Internet Operations Manager, The River Internet \\ marcus@theriver.com \\ Access Co., Tucson AZ. http://www.theriver.com/
Re: c-nocem undermining history cache?
Author: Forrest J. Cavalier III
Date: Thu, 23 Oct 1997 00:00
Date: Thu, 23 Oct 1997 00:00
51 lines
3214 bytes
3214 bytes
In article <62ob86$86g$1@news.theriver.com>, marcus@theriver.com wrote... > >In article <86pvowi893.fsf@blah.erols.com>, coneill@blah.erols.com wrote: >>marcus@theriver.com (Marcus Needham) writes: >>And what if you just added a bunch of message-id's that you have >>cached as "don't have". You're screwed in that instance. You have to >>keep the cache coherent with the on disk history, and the only way to >>do that is to invalidate the cache on reload or revalidate it on >>reload. I think most people would prefer to invalidate it. If you >>come up with another solution, feel free to submit the code. > >I do, or at least I think I do. My original suggestion was to sweep item by >item through the history cache when the history file is closed, keeping all >"haves" and discarding all "don't haves." I implemented this yesterday, and >I have observed that only a handful of entries are discarded each time. For >midnight to 9am this morning for example my server was paused 46 times (mainly >by c-nocem) and on average only 144 articles (out of approx 64k) were dropped >from the cache each time. This makes sense because almost every time you add a >"don't have" to the cache in normal operation the article is accepted very >soon thereafter and the entry changed to "have." > >I am not an inn hacker (yet) though so that's why I am seeking opinions on the >idea from those in the know. Sounds like you'll make a great INN hacker to me. Currently, the history cache values are considered "HAVE" vs "DONT-HAVE." I prefer to think of them a bit differently, regardless of what the NNTP terminology reply/command is called, and what the functions say they are returning. I think of them as "DONT-WANT" and "DONT-HAVE". So even if nocem cancels removed articles, the DONT-WANT status does not need to be purged from the cache. (It is no longer true that you "HAVE" the article, but it is still true that you "DONT-WANT" it.) I think I agree on the need to purge DONT-HAVE's. A definitive answer to DONT-HAVE is necessary to stop writing duplicate message IDs to the history database. If something else could ensure this could not happen, then the only harm in not purging DONT-HAVE's would be accepting a couple of extra duplicates over your connections. Aside note: last time I looked at the history cache, it was wasting an int (32 bits) to store a BOOL. Is this still true? Surely we could think of better things to do with those other 31 bits. Forrest
Re: c-nocem undermining history cache?
Author: coneill
Date: Thu, 23 Oct 1997 00:00
Date: Thu, 23 Oct 1997 00:00
33 lines
2510 bytes
2510 bytes
marcus@theriver.com (Marcus Needham) writes: > In article <62nju0$i9o$1@bigred.inka.de>, olaf@bigred.inka.de (Olaf Titz) wrote: > >Marcus Needham <marcus@theriver.com> wrote: > >> I notice that Jeff Garzik's history cache patch's cache is cleared when > >> innd is paused and the history file closed (and I think Clayton O'Niell's > >> is too). Running c-nocem this happens on my news server every 10-30 > >> minutes or so which seems to me to undermine the usefulness of the cache > >> somewhat. Is it strictly necessary to wholly flush the cache? > > > >I don't know how the history cache works, but I assume the answer is > >yes, because theoretically re-opening the history can mean opening a > >completely new history file. Think of what expire does. > > The cache stores message-id hashes with "have" or "don't have" from previous > lookups. Even though expire generates a whole new history file the existing > values of these lookups seem to me to still be valid (or at least "useful"). > > If we have a "have" value cached that is now no longer actually correct > because expire removed the message its does not matter because we still don't > want another copy of the message so its ok to believe we still have one. If > we have a "don't have" value cached then expire does not add messages so it > must still be valid. No? And what if you just added a bunch of message-id's that you have cached as "don't have". You're screwed in that instance. You have to keep the cache coherent with the on disk history, and the only way to do that is to invalidate the cache on reload or revalidate it on reload. I think most people would prefer to invalidate it. If you come up with another solution, feel free to submit the code.
Re: c-nocem undermining history cache?
Author: Marcus Needham
Date: Thu, 23 Oct 1997 00:00
Date: Thu, 23 Oct 1997 00:00
28 lines
2029 bytes
2029 bytes
In article <62nju0$i9o$1@bigred.inka.de>, olaf@bigred.inka.de (Olaf Titz) wrote: >Marcus Needham <marcus@theriver.com> wrote: >> I notice that Jeff Garzik's history cache patch's cache is cleared when >> innd is paused and the history file closed (and I think Clayton O'Niell's >> is too). Running c-nocem this happens on my news server every 10-30 >> minutes or so which seems to me to undermine the usefulness of the cache >> somewhat. Is it strictly necessary to wholly flush the cache? > >I don't know how the history cache works, but I assume the answer is >yes, because theoretically re-opening the history can mean opening a >completely new history file. Think of what expire does. The cache stores message-id hashes with "have" or "don't have" from previous lookups. Even though expire generates a whole new history file the existing values of these lookups seem to me to still be valid (or at least "useful"). If we have a "have" value cached that is now no longer actually correct because expire removed the message its does not matter because we still don't want another copy of the message so its ok to believe we still have one. If we have a "don't have" value cached then expire does not add messages so it must still be valid. No? // Marcus Needham // Internet Operations Manager, The River Internet \\ marcus@theriver.com \\ Access Co., Tucson AZ. http://www.theriver.com/
Re: c-nocem undermining history cache?
Author: Howard Goldstein
Date: Thu, 23 Oct 1997 00:00
Date: Thu, 23 Oct 1997 00:00
24 lines
2148 bytes
2148 bytes
On 23 Oct 1997 15:37:04 +0200, Olaf Titz <olaf@bigred.inka.de> wrote: : And then there is the design bug that INN can process cancels while : paused by opening the history file. If this happens during an expire : run, it will lose just one or a few history entries, but it can also : corrupt the history file completely. ncmspool has this problem, I've : been told. It did, but it was addressed in the ncmspool beta. The resolution works in the usual cases, i.e., where the history-mucker is cooperative in the fashion that news.daily cooperates by sleeping for a few seconds before screwing around with history. This approach is admittedly flawed in that it isn't self contained, but it does offer the ability to process NCMs in near real time without having to pause the server. A more generic fix requires an INN patch to overcome the INN's open-while-paused design feature. -- Judging by who's against it, NoCeM must be a good thing
Re: c-nocem undermining history cache?
Author: Marcus Needham
Date: Fri, 24 Oct 1997 00:00
Date: Fri, 24 Oct 1997 00:00
20 lines
1578 bytes
1578 bytes
In article <62q5uv$6qa$1@bigred.inka.de>, olaf@bigred.inka.de (Olaf Titz) wrote: >Marcus Needham <marcus@theriver.com> wrote: >> If we have a "have" value cached that is now no longer actually >> correct because expire removed the message its does not matter >> because we still don't want another copy of the message so its ok to >> believe we still have one. If we have a "don't have" value cached >> then expire does not add messages so it must still be valid. No? > >This is true for expire; but it's not true for c-nocem, which does add >entries to the history. You can't keep "don't have" entries for >articles which get cancelled by NoCeM. Right. My proposal is to dump all "don't have" entries (of which there are very few) and keep the "haves." // Marcus Needham // Internet Operations Manager, The River Internet \\ marcus@theriver.com \\ Access Co., Tucson AZ. http://www.theriver.com/
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