Thread View: news.software.nntp
3 messages
3 total messages
Started by Dougal Campbell
Thu, 20 Nov 1997 00:00
innlog.pl timer stats patch
Author: Dougal Campbell
Date: Thu, 20 Nov 1997 00:00
Date: Thu, 20 Nov 1997 00:00
151 lines
7436 bytes
7436 bytes
Since I have the timer patch in my server, I wanted to get some numbers
out of it to see how I was doing. Plus I wanted to get rid of all the
annoying "unknown entries" that it caused in my news.daily reports.
This patch is admittedly very quick and very dirty. If you think it's
ugly, just keep your remarks to yourself and post a better patch. :)
Here is some sample output:
=====
INND timer statistics (averaged)
Average report time: 301.68 seconds (281 samples)
Percent busy: 52.72%
Time per article write: 189.04 ms
Time per crosslink: 0.15 ms
Time per history write: 7.46 ms
Time per history lookup: 20.40 ms
Percent time artwrite: 40.79%
Percent time artlink: 0.01%
Percent time hiswrite: 1.95%
Percent time hishave: 6.12%
=====
Yeah, yeah, I know that my news box isn't the beefiest thing in the
world (mainly in the artwrite times). But it's keeping up, and that's
what matters. Maybe one day I'll switch from my AHA3940UW to multiple
Buslogic controllers and stripe more than 2 disks for my spool.
That said, here's my patch. It works against the innlog.pl from INN
1.7. I haven't tried other versions, but I don't think much has
changed, so it will probably work with older versions as well.
=====
--- site/innlog.pl Mon Nov 17 16:02:34 1997
+++ /usr/lib/news/innlog.pl Wed Nov 19 14:53:03 1997
@@ -317,6 +317,41 @@
next;
}
+ if ($Fld[6] eq "ME" && $Fld[7] eq "time") {
+ $innd_misc_event++;
+ $innd_timer_count++;
+ $innd_timer_time+=$Fld[8]/1000.0;
+ ($idle_time, $idle_count) = ($Fld[10] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($artwrite_time, $artwrite_count) = ($Fld[12] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($artlink_time, $artlink_count) = ($Fld[14] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($hiswrite_time, $hiswrite_count) = ($Fld[16] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($hissync_time, $hissync_count) = ($Fld[18] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($sitesend_time, $sitesend_count) = ($Fld[20] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($artctrl_time, $artctrl_count) = ($Fld[22] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($artcncl_time, $artcncl_count) = ($Fld[24] =~ /([0-9]+)\(([0-9]+)\)/);
+ ($hishave_time, $hishave_count) = ($Fld[26] =~ /([0-9]+)\(([0-9]+)\)/);
+
+ $innd_timer_idle_time+=$idle_time/1000.0;
+ $innd_timer_idle_count+=$idle_count;
+ $innd_timer_artwrite_time+=$artwrite_time/1000.0;
+ $innd_timer_artwrite_count+=$artwrite_count;
+ $innd_timer_artlink_time+=$artlink_time/1000.0;
+ $innd_timer_artlink_count+=$artlink_count;
+ $innd_timer_hiswrite_time+=$hiswrite_time/1000.0;
+ $innd_timer_hiswrite_count+=$hiswrite_count;
+ $innd_timer_hissync_time+=$hissync_time/1000.0;
+ $innd_timer_hissync_count+=$hissync_count;
+ $innd_timer_sitesend_time+=$sitesend_time/1000.0;
+ $innd_timer_sitesend_count+=$sitesend_count;
+ $innd_timer_artctrl_time+=$artctrl_time/1000.0;
+ $innd_timer_artctrl_count+=$artctrl_count;
+ $innd_timer_artcncl_time+=$artcncl_time/1000.0;
+ $innd_timer_artcncl_count+=$artcncl_count;
+ $innd_timer_hishave_time+=$hishave_time/1000.0;
+ $innd_timer_hishave_count+=$hishave_count;
+ next;
+ }
+
if ($Fld[7] eq 'connected') {
## Account for the fact that innd says "local connected ##"
## and then "localhost:## closed"
@@ -1719,6 +1754,58 @@
print "\n";
}
+
+## Timer statistics
+if ($innd_timer_count)
+{
+ print "INND timer statistics (averaged)\n";
+
+ $timer_time_avg = $innd_timer_time / $innd_timer_count;
+
+ $timer_idle_time_avg = $innd_timer_idle_time / $innd_timer_count;
+ $timer_idle_count_avg = $innd_timer_idle_count / $innd_timer_count;
+ $timer_artwrite_time_avg = $innd_timer_artwrite_time / $innd_timer_count;
+ $timer_artwrite_count_avg = $innd_timer_artwrite_count / $innd_timer_count;
+ $timer_artlink_time_avg = $innd_timer_artlink_time / $innd_timer_count;
+ $timer_artlink_count_avg = $innd_timer_artlink_count / $innd_timer_count;
+ $timer_hiswrite_time_avg = $innd_timer_hiswrite_time / $innd_timer_count;
+ $timer_hiswrite_count_avg = $innd_timer_hiswrite_count / $innd_timer_count;
+ $timer_hissync_time_avg = $innd_timer_hissync_time / $innd_timer_count;
+ $timer_hissync_count_avg = $innd_timer_hissync_count / $innd_timer_count;
+ $timer_sitesend_time_avg = $innd_timer_sitesend_time / $innd_timer_count;
+ $timer_sitesend_count_avg = $innd_timer_sitesend_count / $innd_timer_count;
+ $timer_artctrl_time_avg = $innd_timer_artctrl_time / $innd_timer_count;
+ $timer_artctrl_count_avg = $innd_timer_artctrl_count / $innd_timer_count;
+ $timer_artcncl_time_avg = $innd_timer_artcncl_time / $innd_timer_count;
+ $timer_artcncl_count_avg = $innd_timer_artcncl_count / $innd_timer_count;
+ $timer_hishave_time_avg = $innd_timer_hishave_time / $innd_timer_count;
+ $timer_hishave_count_avg = $innd_timer_hishave_count / $innd_timer_count;
+
+ $busy_pct = 100 * ($timer_time_avg - $timer_idle_time_avg) / $timer_time_avg;
+ $artwrite_time = 1000 * $timer_artwrite_time_avg / $timer_artwrite_count_avg;
+ $artwrite_pct = 100 * $timer_artwrite_time_avg / $timer_time_avg;
+ $artlink_time = 1000 * $timer_artlink_time_avg / $timer_artlink_count_avg;
+ $artlink_pct = 100 * $timer_artlink_time_avg / $timer_time_avg;
+ $hiswrite_time = 1000 * $timer_hiswrite_time_avg / $timer_hiswrite_count_avg;
+ $hiswrite_pct = 100 * $timer_hiswrite_time_avg / $timer_time_avg;
+ $hishave_time = 1000 * $timer_hishave_time_avg / $timer_hishave_count_avg;
+ $hishave_pct = 100 * $timer_hishave_time_avg / $timer_time_avg;
+
+ printf "Average report time: %6.2f seconds",$timer_time_avg;
+ print " ($innd_timer_count samples)\n";
+ printf "Percent busy: %6.2f%%\n\n" , $busy_pct;
+
+ printf "Time per article write: %6.2f ms\n" , $artwrite_time;
+ printf "Time per crosslink: %6.2f ms\n" , $artlink_time;
+ printf "Time per history write: %6.2f ms\n" , $hiswrite_time;
+ printf "Time per history lookup: %6.2f ms\n\n" , $hishave_time;
+ printf "Percent time artwrite: %6.2f%%\n" , $artwrite_pct;
+ printf "Percent time artlink: %6.2f%%\n" , $artlink_pct;
+ printf "Percent time hiswrite: %6.2f%%\n" , $hiswrite_pct;
+ printf "Percent time hishave: %6.2f%%\n" , $hishave_pct;
+ print "\n";
+}
+
## NNRP statistics.
if ($nnrp)
--
Dougal Campbell, Systems Manager, ADViCOM dougal@advicom.net
http://www.advicom.net/ http://advicom.net/~dougal/
See my homepage for anti-spam information!
QUOTE OF THE MOMENT:
Westheimer's Discovery:
A couple of months in the laboratory can frequently save a
couple of hours in the library.
Re: innlog.pl timer stats patch
Author: Dan Foster
Date: Thu, 20 Nov 1997 00:00
Date: Thu, 20 Nov 1997 00:00
24 lines
1529 bytes
1529 bytes
In article <651lmn$j5n$1@polo.advicom.net>, Dougal Campbell <dougal@vespucci.advicom.net> wrote: >Since I have the timer patch in my server, I wanted to get some numbers >out of it to see how I was doing. Plus I wanted to get rid of all the >annoying "unknown entries" that it caused in my news.daily reports. >This patch is admittedly very quick and very dirty. If you think it's >ugly, just keep your remarks to yourself and post a better patch. :) *run*, don't walk, to ftp.eerie.fr and grab Fabien Tassin's *awesome* innreport program. You'll wonder how you ever lived without it. Apparently, the folks putting together INN agrees - and is having it integrated into 1.8. :) It's a drop-in replacement for innlog and is *so* much more useful. Requires perl5, but hey, can do so much more. ftp.eerie.fr:/pub/usenet/innreport/innreport.pl I believe that's correct. -Dan
Re: innlog.pl timer stats patch
Author: Fabien Tassin
Date: Fri, 21 Nov 1997 00:00
Date: Fri, 21 Nov 1997 00:00
14 lines
896 bytes
896 bytes
In article <651sb3$1vdo$1@node6.cwnet.frontiernet.net>, dsf@node6.cwnet.frontiernet.net (Dan Foster) writes: > > ftp.eerie.fr:/pub/usenet/innreport/innreport.pl > > I believe that's correct. humm.. this one exists but is a bit old. Try the 'unsupported' directory ;) -- Fabien Tassin -=- tassin@eerie.fr
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