What's the best alternative to LISTGROUP with no args?
It's not the algorithm that is slow per se, but asking inn for all the article numbers in a group with thousands of articles takes quite a
long time.
I suspect that inn doesn't have any sort of in-memory
cache for this information and instead is directory scanning the spool directory and reporting back the article numbers one by one.
Hi Richard,
It's not the algorithm that is slow per se, but asking inn for all the
article numbers in a group with thousands of articles takes quite a
long time.
How much time does it take?
LISTGROUP returns the 1,365,681 articles in 2,6 seconds. Not that slow...
I suspect that inn doesn't have any sort of in-memory
cache for this information and instead is directory scanning the spool
directory and reporting back the article numbers one by one.
INN has the available articles and its overview database, and depending
on the configuration of the server (nnrpdcheckart and groupexactcount >parameters), either directly returns the information from overview or
checks the article is still here.
The 2,6 seconds above include the check.
On my server (admittedly, nntp isn't as important to my ISP as it was
in the 90s, so they probably have it running on an old machine for the
last few customers that actually read news -- like me), it takes
multiple minutes to get all the articles for, say, comp.arch.
When I watch it with strace it's about one article per second and the
read buffer is so empty that it's literally reading just one response
line per call to read.
My long-term goal for trn is to move more towards asynchronous I/O
instead of synchronous I/O. So I'm thinking LISTGROUP with low and
high used from your newsrc in order to fetch the likely never seen
before article numbers on the blocking path and then asynchronously
fetch whatever is needed in the background once you've entered the
group. There's nothing wrong with doing a LISTGROUP for all the
remaining article numbers asynchronously in the background.
Could you try to send a LISTGROUP command to fr.soc.politique with trn >connected to my news server? (news.trigofacile.com, available in reading)
It would be interesting to know the result.
There may also be a bandwidth issue?
When I watch it with strace it's about one article per second and the
read buffer is so empty that it's literally reading just one response
line per call to read.
Very slow for just an article number (not the contents of a whole article).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 499 |
Nodes: | 16 (2 / 14) |
Uptime: | 60:22:04 |
Calls: | 9,840 |
Calls today: | 1 |
Files: | 13,764 |
Messages: | 6,194,817 |
Posted today: | 1 |