diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1168,7 +1168,12 @@ } if (nswbuf == 0) { - nswbuf = min(nbuf / 4, 256); + /* + * Pager buffers are allocated for short periods, so scale the + * number of reserved buffers based on the number of CPUs rather + * than amount of memory. + */ + nswbuf = min(nbuf / 4, 32 * mp_ncpus); if (nswbuf < NSWBUF_MIN) nswbuf = NSWBUF_MIN; }