Article View: news.software.nntp
Article #11588ANNOUNCE - innd-timer patch for inn1.4unoff4
From: Joe Greco
Date: Fri, 11 Oct 1996 00:00
Date: Fri, 11 Oct 1996 00:00
130 lines
6626 bytes
6626 bytes
innd-timer patch rev 0.2
Joe Greco <jgreco@ns.sol.net>
sol.net Network Services - Milwaukee, WI
This code was inspired by a similar bit of code by Nils McCarthy at
Primenet Services for the Internet. Like his code, this code is capable
of reporting the amount of idle time that your innd currently has.
However, that was a very frustrating bit of information, in my opinion,
since usually you know if your innd is having performance problems.
I have traditionally used process profiling to gather better statistics
on how much time was being spent in various parts of the system. This
worked very well, and was very detailed... almost too much so. It was
also a bit of a pain in the rear to set up, and could only provide long
term cumulative performance data since the profiling code available to
me dumps its statistics at process termination.
It was not a good way to do it.
So, the following tool came to existence late one evening when I really
wanted to know why a machine was saturated.
Like the idle time tool, it reports to news.notice every five minutes and
provides a summary of time spent in the select() call (essentially waiting
for something to happen, i.e. idle). However, it is also capable of
reporting on other events, and the number of times they occurred.
A sample:
Oct 9 11:39:25 news innd: ME time 300097 idle 196062(9493) artwrite 65207(1009) artlink 11(339) hiswrite 6879(1009) hissync 2(16) sitesend 232(5320) artctrl 0(17) artcncl 0(1) hishave 6145(8876)
Notes: all times reported in milliseconds. 300097 = 300.097 seconds. The
numbers in parenthesis are the number of calls made to this particular
timer during the five minute interval.
The following are the numbers I extract from this raw information.
Percent busy: (300097 - 196062) / 300097 = 35%
Time per article write: 65207 / 1009 = 64 ms
Percent time spent writing art: 65207 / 300097 = 21%
Time per crosslink: 11 / 339 = 0 ms
Percent time spent crosslink: 11 / 300097 = 0%
Time per history write: 6879 / 1009 = 7 ms
Percent time spent writing his: 6879 / 300097 = 2%
Time per history lookup: 6145 / 8876 = 1 ms
Percent time spent hist lookup: 6145 / 300097 = 2%
(The history sync, site send, art control and art cancel numbers do not
seem to be useful, but I have not verified why this is yet.)
In any case, the above numbers are all calculated such that you want them
to be as close to zero as possible.
One further rule of thumb metric I have noticed is that the number of
elapsed milliseconds ("time") is a very good measure of whether or not
there is latency in the system, the closer to 300000 it is, the less
latency there is. Once you get past 301000, you have lots of latency.
Another site:
Oct 9 12:07:45 news innd: ME time 306964 idle 7(50) artwrite 178598(1152) artlink 79069(603) hiswrite 25385(1178) hissync 70(20) sitesend 235(6782) artctrl 0(0) artcncl 0(0) hishave 2357(1969) hisgrep 11(16)
This site is clearly being dominated by spool access times. Between the sum
of the artwrite and artlink times, a vast majority of the 306 second sample
time is being used. The site is clearly not using crosspost, but even if
it did, further steps would be required to correct the spool problems.
The history lookup and write rates are also pretty bad, but not dominant.
Another site:
Oct 4 22:29:49 news innd: ME time 312518 idle 15090(1399) artwrite 90455(496) artlink 30811(227) hiswrite 4380(503) hissync 253(98) sitesend 70(1275) artctrl 2737(17) artcncl 0(0) hishave 158409(1734) hisgrep 7(10)
Oct 8 00:38:04 news innd: ME time 300654 idle 99(1005) artwrite 157706(1373) artlink 58071(544) hiswrite 9347(1416) hissync 9(28) sitesend 191(4603) artctrl 4369(53) artcncl 101(2) hishave 50061(4061) hisgrep 3(12)
Oct 8 00:53:34 news innd: ME time 300044 idle 182(1288) artwrite 199605(1462) artlink 16(493) hiswrite 10086(1547) hissync 15(28) sitesend 314(6324) artctrl 2035(38) artcncl 2322(54) hishave 66894(4854) hisgrep 3(7)
The first and second ones had no crosspost, the third one did. The news
lib (history, active, et al) was on the root disk for the first sample,
but on a faster disk for the second two.
Quite frankly the hishave times stank at first. At 91 ms per lookup, that
means a maximum of about 11 per second were possible. After adding a
separate disk, this went down to 13 ms per lookup. This is still not
"great" in my book, but it is much better!
Also notice when crosspost was enabled, right away, the artwrite rate
jumped from 1373 to 1462, but the general spool access time was still
pretty crummy. This is still the limiting factor of this news system.
In any case, the tool itself will not tell you why your news system
is so bad. However, it can provide some good, detailed clues as to
what your news system is spending time doing, and that is pretty
useful information if you take the time to understand what it means.
I do not have any wonder tools to help postprocess the information.
Future possible additions:
A latency timer, timing the minimum, average, and maximum times to make
a complete pass through the select()'ed hosts. This would give clues as
to the amount of time it took for INND to print a banner or kick off an
NNRP session, and would be helpful in judging the throughput possible on
non-streaming connections.
An article-write timer to help identify particularly slow spool disks
by recording the amount of time on a per-article basis taken to write
that article.
In any case: a special thanks to:
Nils McCarthy for an excellent idea and a good Web page that has some
useful hints. http://www.nntp.primenet.com/INN/
Michael Beckmann for being an excellent guinea pig.
Michael Shields, Joe St Sauver, Dave Pascoe, and a few other folks for
beta testing.
Good luck!
begin 644 innd-timer.tgz
<uuencoded_portion_removed>
@=?R_CO_7\?\Z_E_'_^OX?QW___/C__\!.%,T2@!@ Z
end
Technical Details
Message-ID:
<53meci$l0i@brasil.moneng.mei.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <53meci$l0i@brasil.moneng.mei.com> Subject: ANNOUNCE - innd-timer patch for inn1.4unoff4 Date: Fri, 11 Oct 1996 00:00:00 +0000 From: jgreco@ns.sol.net (Joe Greco) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 188807733 Distribution: inet Sender: jgreco@brasil.moneng.mei.com Organization: sol.net Network Services - Milwaukee, WI Newsgroups: news.software.nntp