Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Apr 2018 01:43:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 227436] increasing kern.maxswzone does nothing
Message-ID:  <bug-227436-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227436

            Bug ID: 227436
           Summary: increasing kern.maxswzone does nothing
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: curtis@ipv6.occnc.com

Created attachment 192425
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D192425&action=
=3Dedit
patch to sys/vm/swap_pager.c (see comments for description)

On current and on 11.1 when using a large amount of swap, increasing
kern.maxswzone does not allow more swap to be used as it used to in 11.0.

A patch is attached which has been tested on AMD64 and ARM64 kernels using =
11.1
stable and current.  It does the following:

1.  If maxswzone is set to less than the system guess (based on RAM), then
reduce maxswzone as specified (current behaviour).

2.  There is a conditional that could be removed that caps the increase in
maxswzone to 8 times the guess based on RAM (lots of swap, but lots is need=
ed
for small ARM stuff that has 512MB or 1GB RAM.  Also had to increase
kern.maxswzone on some of my AMD64 servers with 8GB RAM).

3.  An increase is made to the effective maxswzone value used (n in the cod=
e)
subject to the above conditional (which could be removed).

4.  Change a printf statement to give swap sizes in pages and MB when
kern.maxswzone is too small for the amount of swap.

5.  Add printf indicating the minimum value of kern.maxswzone that will qui=
et
the warning (and presumably allow that amount of swap to be used).

6.  Add a conditional that catches the case where the guess at the size of
struct swblk in sys/i386/include/param.h is wrong.  This code was removed in
other architectures so affects i386 only.  I added this code temporarily to
amd64 to test.

I've been using this patch with no adverse affect on multiple production
servers and vm for a few weeks.  Given that all it does is allow increase in
kern.maxswzone to take effect, it should be safe and should go into 11.2, b=
ut
at least go into 12.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227436-227>