🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Joe Greco Fri, 11 Oct 1996 00:00
ANNOUNCE - innd-timer patch for inn1.4unoff4
#11588
Author: Joe Greco
Date: Fri, 11 Oct 1996 00:00
130 lines
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

Re: ANNOUNCE - innd-timer patch for inn1.4unoff4
#11667
Author: Joe Greco
Date: Tue, 15 Oct 1996 00:00
6 lines
710 bytes
So... has anyone found this useful, learned anything interesting, etc?

... JG

Re: ANNOUNCE - innd-timer patch for inn1.4unoff4
#11674
Author: Clayton O'Neill
Date: Tue, 15 Oct 1996 00:00
32 lines
1928 bytes
On 15 Oct 1996 12:21:39 -0500, Joe Greco <jgreco@ns.sol.net> wrote:
>So... has anyone found this useful, learned anything interesting, etc?

Interesting, yes.  Here's the numbers from my primary feed machine
yesterday:

INND server statistics
Percent idle:                          75.28%
Time per article write:                32.22ms
Percent time spent writing art:         8.95% (239805)
Time per article link:                  0.03ms
Percent time spent linking art:         0.00% (136068)
Time per history write:                 0.52ms
Percent time spent writing his:         0.15% (241910)
Time per sitesend:                      0.55ms
Percent time spent sending:             0.00% (484)
Time per control message:               0.07ms
Percent time spent on control msgs:     0.06% (723694)
Time per IHAVE lookup:                  0.07ms
Percent time spent on IHAVE's:          0.06% (723694)


I find these numbers pretty encouraging.  I'm only about 25% busy, and the
10% of that is from article writes which is, for the most part, a constant. 
Based on these IHAVE numbers, I'm hoping that I'm going to be able to
service 100-200 feeds on this box before I start reaching saturation.  Am I
out of my mind, or this sound reasonable?  The box is currently holding
approximately 20 feeds.


Re: ANNOUNCE - innd-timer patch for inn1.4unoff4
#11772
Author: Joe Greco
Date: Sat, 19 Oct 1996 00:00
55 lines
2971 bytes
In article <slrn5681b9.eeg.coneill@blah.erols.com>,
Clayton O'Neill <coneill@oneill.net> wrote:
>On 15 Oct 1996 12:21:39 -0500, Joe Greco <jgreco@ns.sol.net> wrote:
>>So... has anyone found this useful, learned anything interesting, etc?
>
>Interesting, yes.  Here's the numbers from my primary feed machine
>yesterday:
>
>INND server statistics
>Percent idle:                          75.28%
>Time per article write:                32.22ms
>Percent time spent writing art:         8.95% (239805)
>Time per article link:                  0.03ms
>Percent time spent linking art:         0.00% (136068)
>Time per history write:                 0.52ms
>Percent time spent writing his:         0.15% (241910)
>Time per sitesend:                      0.55ms
>Percent time spent sending:             0.00% (484)
>Time per control message:               0.07ms
>Percent time spent on control msgs:     0.06% (723694)
>Time per IHAVE lookup:                  0.07ms
>Percent time spent on IHAVE's:          0.06% (723694)
>
>I find these numbers pretty encouraging.  I'm only about 25% busy, and the
>10% of that is from article writes which is, for the most part, a constant. 
>Based on these IHAVE numbers, I'm hoping that I'm going to be able to
>service 100-200 feeds on this box before I start reaching saturation.  Am I
>out of my mind, or this sound reasonable?  The box is currently holding
>approximately 20 feeds.

Some comments:

You will notice that the percentages for each of these items does not
add up to (100 - idle)...

I believe that a fair portion of the rest of the time is spent doing
mundane things such as network I/O and general parsing/processing,
so I will remind you that you have to consider that a lot of this
"hidden" time may scale linearly with the number of feeds that you
have.

Based on that I would look at your idle figure again after adding
only 20 more feeds and see what the impact is.  You may be able
to get a better idea of what the scaling factor is.

The rest looks pretty good.  Did you hack up a mod to innlog.pl to
do this?  (Wanna share?)

p.s.: I am looking for people who want to help me locate "good" 
places to add timekeeping calls to innd.  You up to the task?  :-)

... JG

Re: ANNOUNCE - innd-timer patch for inn1.4unoff4
#11796
Author: Michael Shields
Date: Sun, 20 Oct 1996 00:00
53 lines
2109 bytes
In article <54c7er$jck@earth.alpha.net>, Joe Greco <jgreco@ns.sol.net> wrote:
> The rest looks pretty good.  Did you hack up a mod to innlog.pl to
> do this?  (Wanna share?)

I did.

--- innlog.pl	1996/10/03 18:40:32	1.1.1.3
+++ innlog.pl	1996/10/18 04:15:45	1.8
@@ -487,6 +495,18 @@
 	    ##  Skip for now - not particularly interesting :-)
 	    next;
 	}
+
+	if ($Fld[7] eq 'time') {
+	    my $i;
+	    $greco_times++;
+	    $greco_latency += $Fld[8] - 300000;
+	    for ($i = 9; $i < $#Fld; $i += 2) {
+		$Fld[$i+1] =~ /^(\d+)\((\d+)\)$/;
+		$greco_numer{$Fld[$i]} += $1;
+		$greco_denom{$Fld[$i]} += $2;
+	    }
+	    next;
+	}
     }
 
     ##
@@ -1107,6 +1148,20 @@
       $ninnd_reject, $percent_accpt, $e_hours, $e_min, $e_sec;
 }
 
+##  Greco data.
+if ($greco_times) {
+    my $item;
+    print "Greco data\n";
+    printf "    Stretch: %.3f ms\n", $greco_latency / $greco_times;
+    printf "    Code region           Time   Invoked      Each\n";
+    foreach $item (sort keys %greco_numer) {
+	printf "    %-16.16s  %8d  %8d  %8.3f\n",
+	       $item, $greco_numer{$item}, $greco_denom{$item},
+	       $greco_numer{$item} / $greco_denom{$item};
+    }
+    print "\n";
+}
+
 ##  Miscellaneous innd statistics.
 if ($innd_bad_msgids) {
     print "Bad Message-ID's offered\n";
-- 
Shields, CrossLink.

Re: ANNOUNCE - innd-timer patch for inn1.4unoff4
#11799
Author: Joe Greco
Date: Sun, 20 Oct 1996 00:00
18 lines
1204 bytes
In article <54drsh$hid@daedalus.crosslink.net>,
Michael Shields <shields@crosslink.net> wrote:
>+##  Greco data.
>+if ($greco_times) {
>+    my $item;
>+    print "Greco data\n";

HAAHHAHAHAHAHHAH!!  :-)  Cool, I warrant having my name inserted into
every one of your daily Usenet reports...  I thought it was a cool
hack but obviously I underestimated.  ;-)

If you do not mind - I will include your patch with my next update to
the timer patch.

... JG

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