Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jul 2015 19:45:44 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Swap on SD or on usb flash drive for rpi2?
Message-ID:  <1436838344.1334.259.camel@freebsd.org>
In-Reply-To: <20150714012444.GA24345@www.zefox.net>
References:  <20150714012444.GA24345@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2015-07-13 at 18:24 -0700, bob prohaska wrote:
> Hi all,
> 
> For some reason my rpi2 insists on having a token amount of swap.
> It's running FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r285428: Sun Jun 14 02:20:56 UTC 2015     bob@rpi2:/usr/obj/usr/src/sys/RPI2  arm
> (please disregard the date, the system built itself today, July 13 2015)
> 
> When running a buildworld cycle it uses about 68 MB of swap. It
> happens that the md filesystems use close to the same amount of
> space. By any chance could the need for swap be eliminated if the
> memory filesystems were replaced by physical partitions on the
> SD card or a usb flash device?
> 
> If physical swap _is_ mandatory is there significant advantage to
> placing it on a device separate from /, as with mechanical disks? 
> 
> Thanks for reading and any guidance,
> 
> bob prohaska

It's probably better for performance to keep /tmp as a memory
filesystem.  Also, such filesystems only use as much memory as they have
files stored in them.  When you delete files the md driver releases the
memory.  There's no reason for /var/tmp and /var/log to be memory
filesystems.

It doesn't matter where a swapfile goes on a flash device, since there's
no overhead for seeking.

It's likely you only need the swap for a few seconds during buildworld,
as it builds bits of clang (especially the tblgen app which takes a ton
of memory to build).

-- Ian




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