Thread View: news.software.nntp
9 messages
9 total messages
Started by drek
Tue, 09 Aug 2011 02:55
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: drek
Date: Tue, 09 Aug 2011 02:55
Date: Tue, 09 Aug 2011 02:55
38 lines
2902 bytes
2902 bytes
On Sun, 07 Aug 2011 14:39:59 +0100, MM <kylix_is@yahoo.co.uk> wrote: <4m4t37tcfcs9d57e60ctb8gubh0fb42sa7@4ax.com>: >>On Sun, 07 Aug 2011 12:55:48 +0100, MM <kylix_is@yahoo.co.uk> wrote: >> >>>I'm experimenting with Message IDs and this approach seems a lot >>>slower than when specifying articles by article number. >>> <snip> > >Every article in Usenet has a number and a message id. The message id >is unique across Usenet, but the article number is specific to each >news server. I think the way it works at the server end, when one >requests an article by message id, is that the server goes away and >looks up the article number it has allocated to that message id. This >may take a while, depending on what kind of database is implemented, >speed of servers etc. > If that's the case wouldn't the reason for any difference you're seeing be best answered by the NSP you're using? Without specifying the software and methodology used in the comparison I don't see how anyone in this group could give a meaningful answer. NZBs are all MID and in such widespread use it would be interesting to know if it's a second best way of locating articles. I see using multiple threads Astraweb saturates this connection regardless of method used so never thought to compare the two to find a difference. As for what might be typical the only place I know that's read by people with enough experience to offer a general assessment is news.software.nntp. With that the cross-post and follow-up has been set for that group and I'll be interested to learn more from any replies. Regards,
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: D. Stussy
Date: Tue, 09 Aug 2011 06:40
Date: Tue, 09 Aug 2011 06:40
54 lines
4065 bytes
4065 bytes
"drek" <none@none.invalid> wrote in message news:6s5147tefb7t0r5pmmnvqoa3j74qh15ukk@4ax.com... > On Sun, 07 Aug 2011 14:39:59 +0100, MM <kylix_is@yahoo.co.uk> wrote: > <4m4t37tcfcs9d57e60ctb8gubh0fb42sa7@4ax.com>: > > >>On Sun, 07 Aug 2011 12:55:48 +0100, MM <kylix_is@yahoo.co.uk> wrote: > >> > >>>I'm experimenting with Message IDs and this approach seems a lot > >>>slower than when specifying articles by article number. > >>> > <snip> > > > >Every article in Usenet has a number and a message id. The message id > >is unique across Usenet, but the article number is specific to each > >news server. I think the way it works at the server end, when one > >requests an article by message id, is that the server goes away and > >looks up the article number it has allocated to that message id. This > >may take a while, depending on what kind of database is implemented, > >speed of servers etc. > > > If that's the case wouldn't the reason for any difference you're > seeing be best answered by the NSP you're using? > > Without specifying the software and methodology used in the comparison > I don't see how anyone in this group could give a meaningful answer. Agreed, but there can be a meaningful answer with some assumptions. By article number: Most news servers maintain an index of some sort of all articles in a group, with high and low watermarks. Therefore, the articles in a group can form an array (if variable data, an array of fixed pointers could be used). Therefore, the article number less the low watermark can be used as a direct index into a fixed array, thus retrieving the article pointer in a search of time "order(1)." This assumes that expired articles between the watermarks occupy array element locations until they become out of range. Otherwise, the search will be order(log2(n)) - i.e equivalent to a strict binary tree search since the array is usually kept in sorted order. By message ID: Most news servers maintain a list of message IDs of all [recent] articles on the server which is group independent. As this is generally an UNSORTED list, searching takes order(n * log(n)) time on average to find the entry with the article storage pointer. [Do I have that correct, or is it order(n^2)?] With either method, once the article storage pointer is retrieved, the cost (time) to actually retrieve the article is the same and thus a constant in comparison that drops out. It's been 21 years since I've had to consider the magnitude of search operations, so I hope I got it correctly stated. In both cases, "n" represents the total number of entries present in the appropriate index.
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Ralph Fox
Date: Tue, 09 Aug 2011 08:31
Date: Tue, 09 Aug 2011 08:31
56 lines
3589 bytes
3589 bytes
On Mon, 08 Aug 2011 19:55:42 -0700, in message <6s5147tefb7t0r5pmmnvqoa3j74qh15ukk@4ax.com>
drek wrote:
> If that's the case wouldn't the reason for any difference you're
> seeing be best answered by the NSP you're using?
That depends the method by which MM is retrieving messages by message-ID
(and also other factors of MM's Agent set-up).
For some methods, Agent first does a search of its own database before
retrieving the message from the news server.
A. It could be that MM is using one of these methods, and the
difference is mostly due to the initial search which Agent
does of its own database.
B. It could be that MM is not using one of these methods, and the
difference can only be due to the news server which MM is
using.
> Without specifying the software and methodology used in the comparison
> I don't see how anyone in this group could give a meaningful answer.
Also true for the methodology, as MM has not said how MM is retrieving
messages by message-ID in Agent.
> NZBs are all MID and in such widespread use it would be interesting to
> know if it's a second best way of locating articles. I see using
> multiple threads Astraweb saturates this connection regardless of
> method used so never thought to compare the two to find a difference.
I'd wait for the OP to say (in auorfa) whether the OP's method of
getting articles my message ID is by using NZBs.
> As for what might be typical the only place I know that's read by
> people with enough experience to offer a general assessment is
> news.software.nntp.
It is not yet clear whether the OP's question is an NSP question and
not an Agent question.
With that in mind,
1. Cross-post continued;
2. Followup set back to alt.usenet.offline-reader.forte-agent
where the OP is posting.
--
Kind regards
Ralph
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Ralph Fox
Date: Tue, 09 Aug 2011 09:45
Date: Tue, 09 Aug 2011 09:45
19 lines
2037 bytes
2037 bytes
On Mon, 8 Aug 2011 23:40:17 -0700, in message <j1qkob$jjd$1@snarked.org> D. Stussy wrote: > By message ID: Most news servers maintain a list of message IDs of all > [recent] articles on the server which is group independent. As this is > generally an UNSORTED list, searching takes order(n * log(n)) time on > average to find the entry with the article storage pointer. [Do I have > that correct, or is it order(n^2)?] It would take order(n) to search a flat unsorted list Sorting the list would takes order(n * log(n)) time for an efficient sort [and order(n^2) for an inefficient sort]. You would not sort the list just to speed a search for ONE entry. -- Kind regards Ralph
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Julien ÉLIE
Date: Tue, 09 Aug 2011 17:00
Date: Tue, 09 Aug 2011 17:00
26 lines
2800 bytes
2800 bytes
Hi Dieter, > By message ID: Most news servers maintain a list of message IDs of all > [recent] articles on the server which is group independent. As this is > generally an UNSORTED list, searching takes order(n * log(n)) time on > average to find the entry with the article storage pointer. [Do I have > that correct, or is it order(n^2)?] As for INN, the history file uses the "dbz" format -- currently v6 :-) We have "history.dir", "history.hash" and "history.index" files (or "history.pag" instead of hash/index if tagged hashes are used). So the search is not really done in an unsorted list. That is the reason of daily expiry process: the history file is rebuilt. Please have a look at the dbz(3) documentation for more information. Searching is usually fast for "old" messages. I haven't look at the algorithm involved but I bet it is o(log(n)) or maybe o(1)? INN also caches recent message-IDs (configuration in inn.conf) so it is also fast, with no disk access into the bargain, for "new" messages. -- Julien ÉLIE « C'est souvent la femme qui nous inspire les grandes choses qu'elles nous empêchent d'accomplir. » (Alexandre Dumas Fils)
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Russ Allbery
Date: Tue, 09 Aug 2011 17:38
Date: Tue, 09 Aug 2011 17:38
16 lines
2217 bytes
2217 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> Please have a look at the dbz(3) documentation for more information.
> Searching is usually fast for "old" messages. I haven't look at the
> algorithm involved but I bet it is o(log(n)) or maybe o(1)?
dbz is basically a giant hash table with chaining (well, something akin to
chaining that's actually slightly more pessimistic; basically, the chains
involve using the next hash slot), so it's somewhere between O(1) and
O(log(n)) depending on how deep the chaining is.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Ralph Fox
Date: Tue, 09 Aug 2011 20:22
Date: Tue, 09 Aug 2011 20:22
56 lines
3721 bytes
3721 bytes
On Tue, 09 Aug 2011 14:50:19 +0100, in message <kqd247th8aht1mu10a6q7n02lg6ob49hrs@4ax.com> MM wrote: > It is not a question specific to Agent, although I happen to use Agent > most of the time, but to all articles and all servers. In this case you would be better asking in newsgroup news.software.nntp where "drek" had redirected the thread. There is already some followup there waiting to be read. That is also where you will find the people with the knowledge to offer a general assessment which is not specific to Agent. [ Cross-post restored to news.software.nntp ] [ Followup restored to news.software.nntp ] > My recent > experience, using Catalyst's SocketTools in VB6, has been that article > retrieval by article *number* has been very quick, whereas using > Message IDs it has been grindingly slow. That can depend on which news server you use. > However, I submitted a ticket > to Astraweb last night complaining of the performance and they've said > to try a few things, like different ports, closing down firewall > and/or anti-virus and suchlike. I suspect it's their servers though > (being slow). > > Thing is, I did a comparison test with NewsgroupDirect and it got 71 > files in one minute, using Message IDs. Estimated time for 500 files > on AW non-SSL was 61 minutes, on AW SSL 43 minutes, but on NGD merely > 16 minutes! > > My suspicion is that AW's performance has been falling off recently. > It is also missing quite a lot of articles which NGD has available. > The files in question were only about 9 months old, so *well* within > the retention period. Are Astraweb increasing their retention? That could have an effect. > No sweat, really, since I only buy blocks, so I'll probably just let > the current AW block expire, then get full-blown NGD (currently I have > only the free 1GB per month offer). Again, for general questions (not specific to Agent), a better place for this question is news.software.nntp. [ Restored drek's Xpost and followup to news.software.nntp ] -- Kind regards Ralph
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Jonathan de Boyne Pollard
Date: Sun, 14 Aug 2011 20:33
Date: Sun, 14 Aug 2011 20:33
47 lines
4374 bytes
4374 bytes
> By article number: Most news servers maintain an index of some sort of > all articles in a group, with high and low watermarks. Therefore, the > articles in a group can form an array (if variable data, an array of > fixed pointers could be used). Therefore, the article number less the > low watermark can be used as a direct index into a fixed array, thus > retrieving the article pointer in a search of time "order(1)." This > assumes that expired articles between the watermarks occupy array > element locations until they become out of range. Otherwise, the > search will be order(log2(n)) - i.e equivalent to a strict binary tree > search since the array is usually kept in sorted order. > That analysis is flawed, lacking as it does some real world factors. The first is that the "index of some sort" in at least some news spools is just the filesystem. Each article number is simply a directory entry, in a directory named after the newsgroup. The access to the article thus depends from the filesystem format used for the disc volume containing the news spool. An old Unix filesystem format with a simple linear directory isn't going to be particularly efficient about finding article number 27069 of 27070, for example, and certainly isn't going to do that in order(1) time. It's vitally important to factor in the news spool structure and the filesystem format. > By message ID: Most news servers maintain a list of message IDs of all > [recent] articles on the server which is group independent. As this is > generally an UNSORTED list, searching takes order(n * log(n)) time on > average to find the entry with the article storage pointer. > Again, this misses out the real world factors. I know of at least one server that handles message ID lookup pretty much as article number lookup above: it uses the filesystem as the database, and a simple two-level directory structure. So, once again, the filesystem format enters into the picture with considerable effect, and needs to be accounted for. A directory lookup of "$SPOOL/snarked.org/j1qkob\$jjd\$1" is going to be quicker on a filesystem with a B-tree-structured directory layout (HPFS, NTFS, and so forth) than on a filesystem with a simple linear directory layout. M. "drek" was quite right to say: > Without specifying the software and methodology used in the comparison > I don't see how anyone in this group could give a meaningful answer. > Indeed, M. "MM" xyrself said that this all was: > depending on what kind of database is implemented >
Re: Is getting article by Message ID inherently slower than by Article Number?
Author: Jonathan de Boyne Pollard
Date: Sun, 14 Aug 2011 20:38
Date: Sun, 14 Aug 2011 20:38
8 lines
2070 bytes
2070 bytes
> NZBs are all MID and in such widespread use it would be interesting to > know if it's a second best way of locating articles. > M. "MM" has already pointed out that if one is communicating information about messages with someone who is using a different Usenet node, there is no alternative to be second best to, since article numbers are local to each node.
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