<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Index: chap-tuning.xml
===================================================================
RCS file: /cvsroot/htdocs/guide/en/chap-tuning.xml,v
retrieving revision 1.12
diff -b -u -r1.12 chap-tuning.xml
--- chap-tuning.xml	4 Apr 2007 08:08:05 -0000	1.12
+++ chap-tuning.xml	7 Apr 2007 10:15:17 -0000
@@ -1689,12 +1689,45 @@
 
       &lt;para&gt;
         LFS writes data to disk in a way that is sometimes too
-        aggressive and leads to congestion.
-	Information on how to throttle writing and finding the right
-        parameters are available 
-	&lt;ulink url="http://mail-index.NetBSD.org/tech-perform/2007/04/01/0000.html"&gt;this&lt;/ulink&gt; and
-	&lt;ulink url="http://mail-index.NetBSD.org/tech-perform/2007/04/01/0001.html"&gt;this&lt;/ulink&gt; mail. 
+        aggressive and leads to congestion. Blair Sadewitz has described
+	a good method for throttling writing and finding the right
+	parameters&lt;footnote&gt;
+	  &lt;para&gt;
+	    See
+	    &lt;ulink url="http://mail-index.NetBSD.org/tech-perform/2007/04/01/0000.html" /&gt; and
+	    &lt;ulink url="http://mail-index.NetBSD.org/tech-perform/2007/04/01/0001.html" /&gt;.
       &lt;/para&gt;
+	&lt;/footnote&gt;.
+	The first step is to disable the sync delay, by setting the
+	following tunables through &amp;man.sysctl.8;:
+      &lt;/para&gt;
+
+      &lt;programlisting&gt;
+vfs.sync.delay = 0
+vfs.sync.filedelay = 0
+vfs.sync.metadelay = 0
+vfs.sync dirdelay = 0
+      &lt;/programlisting&gt;
+
+      &lt;para&gt;
+	Then, find out how much bandwidth you have inside and outside
+	of the disk. This can be done by running
+	&lt;command&gt;newfs_lfs -ANF&lt;/command&gt; on a partition close to
+	cylinder 0, and then on a partition close to the last cyclinder.
+	Average these two numbers, and calculate the LFS
+	&lt;emphasis&gt;page trip&lt;/emphasis&gt; with the following formula:
+      &lt;/para&gt;
+
+      &lt;para&gt;
+	&lt;emphasis&gt;t = (avg_bandwidth_in_bytes / PAGE_SIZE) / 4&lt;/emphasis&gt;
+      &lt;/para&gt;
+
+      &lt;para&gt;
+	Now you can set the &lt;emphasis&gt;vfs.lfs.pagetrip&lt;/emphasis&gt; tunable
+	to &lt;emphasis&gt;t&lt;/emphasis&gt; through &amp;man.sysctl.8;.
+      &lt;/para&gt;
+
+      &lt;!-- XXX - Add note about BUFQ_PRIOCSCAN and BUFQ_READPRIO. --&gt;
     &lt;/sect2&gt;
 
   &lt;/sect1&gt;
</pre></body></html>