Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Sep 2018 12:40:03 +0000
From:      Lorenzo Salvadore <>
To:        FreeBSD Questions <>
Subject:   Re: swap config
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> My system has 16GB of memory, so I multiplied that by 4 to get 64GB.
> I created a swap partition of 64GB.
> When I boot, I get:
> warning: total configured swap (16777216 pages) exceeds maximum recommend=
> amount (986928 pages).
> warning: increase kern.maxswzone or reduce amount of swap.
> I tried adding kern.maxswzone to /boot/loader.conf but it complains no ma=
> what value I set.
> What should I do? I'm not actually swapping, since I have so much memory,=
> I could turn swap off and re-create the swap partition.
> Correct?

The swap space you reserve depends of course on what you do with your compu=
however 64GB, whatever your use is and whatever the formula you used to
determine this is, seems huge to me. Keep in mind that

1.  as you say, you already have 16GB of RAM and you are not swapping, henc=
    you are waisting 64GB of HD;

2.  swap is slow: if you ever happen to need that much swap space, then you=
    better have a very fast computer to still use it! I.e. a very fast disk=
 access (cpu
    speed is secondary), and I doubt normal computers are able to reach suc=
h high speeds.

I would suggest you turn off swap completely, without recreating any swap p=
In alternative, you could use a zfs filesystem, which would allow you to si=
your swap space dynamically as you need it and you could still set maxium a=
minimum swap space if you wanted.

Lorenzo Salvadore.

Want to link to this message? Use this URL: <>