INN commit: trunk (7 files)

INN Commit Russ_Allbery at isc.org
Wed May 7 07:48:48 UTC 2008


    Date: Wednesday, May 7, 2008 @ 00:48:48
  Author: iulius
Revision: 7826

Change three inn.conf settings:

articlemmap:  false -> true
hiscachesize:     0 -> 256
nntpactsync renamed to incominglogfrequency

innupgrade handles this renaming.

Modified:
  trunk/doc/pod/inn.conf.pod
  trunk/include/inn/innconf.h
  trunk/innd/nc.c
  trunk/lib/innconf.c
  trunk/samples/inn.conf.in
  trunk/scripts/innupgrade.in
  trunk/tests/overview/xref-t.c

-------------------------+
 doc/pod/inn.conf.pod    |   26 +++++++++++++-------------
 include/inn/innconf.h   |    2 +-
 innd/nc.c               |    2 +-
 lib/innconf.c           |    6 +++---
 samples/inn.conf.in     |    6 +++---
 scripts/innupgrade.in   |    8 ++++++++
 tests/overview/xref-t.c |    2 +-
 7 files changed, 30 insertions(+), 22 deletions(-)

Modified: doc/pod/inn.conf.pod
===================================================================
--- doc/pod/inn.conf.pod	2008-05-07 07:15:33 UTC (rev 7825)
+++ doc/pod/inn.conf.pod	2008-05-07 07:48:48 UTC (rev 7826)
@@ -174,14 +174,16 @@
 
 =item I<hiscachesize>
 
-If set to a value other than C<0>, a hash of recently received message IDs
+If set to a value other than C<0>, a hash of recently received Message-IDs
 is kept in memory to speed history lookups.  The value is the amount of
 memory to devote to the cache in kilobytes.  The cache is only used for
-incoming feeds and a small cache can hold quite a few message IDs, so
+incoming feeds and a small cache can hold quite a few Message-IDs, so
 large values aren't necessarily useful unless you have incoming feeds that
-are badly delayed.  A good value for a system with more than one incoming
-feed is C<256>; systems with only one incoming feed should probably leave
-this at C<0>.  The default value is C<0>.
+are badly delayed.  B<innreport> can provide useful statistics regarding
+the use of the history cache, especially when it misses.  A good value
+for a system with more than one incoming feed is C<256>; systems with
+only one incoming feed should probably set this to C<0>.  The default
+value is C<256>.
 
 =item I<ignorenewsgroups>
 
@@ -540,7 +542,7 @@
 Whether to attempt to mmap() articles.  Setting this to true will give
 better performance on most systems, but some systems have problems with
 mmap().  If this is set to false, articles will be read into memory before
-being sent to readers.  This is a boolean value and the default is false.
+being sent to readers.  This is a boolean value and the default is true.
 
 =item I<clienttimeout>
 
@@ -999,6 +1001,11 @@
 is the default for C<cnfsstat -l>, currently 600 seconds).  This is a
 boolean value and the default is false.
 
+=item I<incominglogfrequency>
+
+How many articles to process on an incoming channel before logging the
+activity.  The default value is C<200>.
+
 =item I<logartsize>
 
 Whether the size of accepted articles (in bytes) should be written to the
@@ -1043,13 +1050,6 @@
 be useful for measuring overview performance.  This is a boolean value and
 the default is false.
 
-=item I<nntpactsync>
-
-How many articles to process on an incoming channel before logging the
-activity.  The default value is C<200>.
-
-FIXME: This is a rather unintuitive name for this parameter.
-
 =item I<nntplinklog>
 
 Whether to put the storage API token for accepted articles (used by

Modified: include/inn/innconf.h
===================================================================
--- include/inn/innconf.h	2008-05-07 07:15:33 UTC (rev 7825)
+++ include/inn/innconf.h	2008-05-07 07:48:48 UTC (rev 7826)
@@ -136,6 +136,7 @@
 
     /* Logging */
     bool docnfsstat;            /* Run cnfsstat in the background? */
+    long incominglogfrequency;  /* Checkpoint log after this many articles */
     bool logartsize;            /* Log article sizes? */
     bool logcancelcomm;         /* Log ctlinnd cancel commands to syslog? */
     long logcycles;             /* How many old logs scanlogs should keep */
@@ -143,7 +144,6 @@
     bool logsitename;           /* Log outgoing site names? */
     bool logstatus;             /* Send a status report to syslog? */
     bool nnrpdoverstats;        /* Log overview statistics? */
-    long nntpactsync;           /* Checkpoint log after this many articles */
     bool nntplinklog;           /* Put storage token into the log? */
     long status;                /* Status file update interval */
     char *stathist;             /* Filename for history profiler outputs */

Modified: innd/nc.c
===================================================================
--- innd/nc.c	2008-05-07 07:15:33 UTC (rev 7825)
+++ innd/nc.c	2008-05-07 07:48:48 UTC (rev 7826)
@@ -213,7 +213,7 @@
       response = cp->Error;
   }
   cp->Reported++;
-  if (cp->Reported >= innconf->nntpactsync) {
+  if (cp->Reported >= innconf->incominglogfrequency) {
     snprintf(buff, sizeof(buff),
       "accepted size %.0f duplicate size %.0f rejected size %.0f",
        cp->Size, cp->DuplicateSize, cp->RejectSize);

Modified: lib/innconf.c
===================================================================
--- lib/innconf.c	2008-05-07 07:15:33 UTC (rev 7825)
+++ lib/innconf.c	2008-05-07 07:48:48 UTC (rev 7826)
@@ -148,9 +148,10 @@
     { K(chanretrytime),         NUMBER  (300) },
     { K(datamovethreshold),     NUMBER  (8192) },
     { K(dontrejectfiltered),    BOOL    (false) },
-    { K(hiscachesize),          NUMBER  (0) },
+    { K(hiscachesize),          NUMBER  (256) },
     { K(icdsynccount),          NUMBER  (10) },
     { K(ignorenewsgroups),      BOOL    (false) },
+    { K(incominglogfrequency),  NUMBER  (200) },
     { K(linecountfuzz),         NUMBER  (0) },
     { K(logartsize),            BOOL    (true) },
     { K(logcancelcomm),         BOOL    (false) },
@@ -160,7 +161,6 @@
     { K(maxartsize),            NUMBER  (1000000) },
     { K(maxconnections),        NUMBER  (50) },
     { K(mergetogroups),         BOOL    (false) },
-    { K(nntpactsync),           NUMBER  (200) },
     { K(nntplinklog),           BOOL    (false) },
     { K(noreader),              BOOL    (false) },
     { K(pathalias),             STRING  (NULL) },
@@ -225,7 +225,7 @@
     { K(nnrpdpostport),         NUMBER  (119) },
 
     /* The following settings are specific to the storage subsystem. */
-    { K(articlemmap),           BOOL    (false) },
+    { K(articlemmap),           BOOL    (true) },
     { K(cnfscheckfudgesize),    NUMBER  (0) },
     { K(immediatecancel),       BOOL    (false) },
     { K(keepmmappedthreshold),  NUMBER  (1024) },

Modified: samples/inn.conf.in
===================================================================
--- samples/inn.conf.in	2008-05-07 07:15:33 UTC (rev 7825)
+++ samples/inn.conf.in	2008-05-07 07:48:48 UTC (rev 7826)
@@ -40,7 +40,7 @@
 #bindaddress:
 #bindaddress6:
 dontrejectfiltered:     false
-hiscachesize:           0
+hiscachesize:           256
 ignorenewsgroups:       false
 immediatecancel:        false
 linecountfuzz:          0
@@ -76,7 +76,7 @@
 # Reading
 
 allownewnews:           true
-articlemmap:            false
+articlemmap:            true
 clienttimeout:          1800
 initialtimeout:         10
 msgidcachesize:         10000
@@ -147,6 +147,7 @@
 # Logging
 
 docnfsstat:             false
+incominglogfrequency:   200
 logartsize:             true
 logcancelcomm:          false
 logcycles:              3
@@ -154,7 +155,6 @@
 logsitename:            true
 logstatus:              false
 nnrpdoverstats:         false
-nntpactsync:            200
 nntplinklog:            false
 #stathist:
 status:                 0

Modified: scripts/innupgrade.in
===================================================================
--- scripts/innupgrade.in	2008-05-07 07:15:33 UTC (rev 7825)
+++ scripts/innupgrade.in	2008-05-07 07:48:48 UTC (rev 7826)
@@ -16,6 +16,7 @@
 ##
 ##   * Clean up inn.conf for the new parser in INN 2.4.
 ##   * Add the hismethod parameter to inn.conf if not found.
+##   * Rename nntpactsync to incominglogfrequency in inn.conf.
 ##   * Move parameters from sasl.conf to inn.conf if needed.
 ##   * Change startinnfeed to innfeed or imapfeed in newsfeeds.
 
@@ -61,13 +62,20 @@
             push (@$output, "#$_\n");
             next;
         }
+
         $hismethod = 1 if $key eq 'hismethod';
+
+        if ($key eq 'nntpactsync') {
+            $key = 'incominglogfrequency';
+        }
+
         $tls = 1 if $key =~ /^tls(capath|cafile|certfile|keyfile)$/;
         $value =~ s/\s+$//;
         if ($value =~ /[\s;\"<>\[\]\\{}]/ && $value !~ /^\".*\"\s*$/) {
             $value =~ s/([\"\\])/\\$1/g;
             $value = '"' . $value . '"';
         }
+
         push (@$output, "$indent$key:$space$value\n");
     }
 

Modified: tests/overview/xref-t.c
===================================================================
--- tests/overview/xref-t.c	2008-05-07 07:15:33 UTC (rev 7825)
+++ tests/overview/xref-t.c	2008-05-07 07:48:48 UTC (rev 7826)
@@ -25,7 +25,7 @@
 fake_innconf(void)
 {
     innconf = xmalloc(sizeof(*innconf));
-    innconf->articlemmap = false;
+    innconf->articlemmap = true;
     innconf->enableoverview = true;
     innconf->groupbaseexpiry = true;
     innconf->keepmmappedthreshold = 1024;



More information about the inn-committers mailing list