Compiling Swap space

Steve O'Hara-Smith steve at sohara.org
Tue Feb 27 08:09:39 UTC 2018


On 27 Feb 2018 00:23:46 -0500
"John Levine" <johnl at iecc.com> wrote:

> In article <20180227040015.7d2fb579.freebsd at edvax.de> you write:
> >On Mon, 26 Feb 2018 19:46:34 -0700, The Doctor wrote:
> >> I notice the default swap is 4G.  
> >> 
> >> How can that be increased to 32G or 64G?
> >
> >By repartitioning your drive.
> 
> You can also use mdconfig to make an md device backed by a file and
> swap on that.  That's slower than a swap partition since it has to

	You don't need mdconfig, just make a large file and use swapon like
this:

# dd if=/dev/zero of=swapfile bs=1m count=1024
# swapon swapfile

> find the blocks using the filesystem, but you don't have to
> repartition, just make a big file for it to swap to.

	All of these disadvantages apply.

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list