[Midnightbsd-cvs] src [7346] trunk/sys/i386/include/param.h: tweak defaults on i386

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Oct 3 11:25:36 EDT 2015


Revision: 7346
          http://svnweb.midnightbsd.org/src/?rev=7346
Author:   laffer1
Date:     2015-10-03 11:25:35 -0400 (Sat, 03 Oct 2015)
Log Message:
-----------
tweak defaults on i386

Modified Paths:
--------------
    trunk/sys/i386/include/param.h

Modified: trunk/sys/i386/include/param.h
===================================================================
--- trunk/sys/i386/include/param.h	2015-10-03 15:23:41 UTC (rev 7345)
+++ trunk/sys/i386/include/param.h	2015-10-03 15:25:35 UTC (rev 7346)
@@ -125,9 +125,15 @@
 /*
  * Ceiling on amount of swblock kva space, can be changed via
  * the kern.maxswzone /boot/loader.conf variable.
+ *
+ * 276 is sizeof(struct swblock), but we do not always have a definition
+ * in scope for struct swblock, so we have to hardcode it.  Each struct
+ * swblock holds metadata for 32 pages, so in theory, this is enough for
+ * 16 GB of swap.  In practice, however, the usable amount is considerably
+ * lower due to fragmentation.
  */
 #ifndef VM_SWZONE_SIZE_MAX
-#define VM_SWZONE_SIZE_MAX	(32 * 1024 * 1024)
+#define VM_SWZONE_SIZE_MAX	(276 * 128 * 1024)
 #endif
 
 /*
@@ -134,9 +140,12 @@
  * Ceiling on size of buffer cache (really only effects write queueing,
  * the VM page cache is not effected), can be changed via
  * the kern.maxbcache /boot/loader.conf variable.
+ *
+ * The value is equal to the size of the auto-tuned buffer map for
+ * the machine with 4GB of RAM, see vfs_bio.c:kern_vfs_bio_buffer_alloc().
  */
 #ifndef VM_BCACHE_SIZE_MAX
-#define VM_BCACHE_SIZE_MAX	(200 * 1024 * 1024)
+#define VM_BCACHE_SIZE_MAX	(7224 * 16 * 1024)
 #endif
 
 /*



More information about the Midnightbsd-cvs mailing list