Date: Tue, 14 Feb 2017 05:20:36 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: wynkoop@wynn.com Cc: Joe Nosay <superbisquit@gmail.com>, freebsd-arm@freebsd.org Subject: Re: Out of swap - NOT Message-ID: <20170214032036.GR2092@kib.kiev.ua> In-Reply-To: <assp.0217334a41.20170213164604.0110b21b@pearl> References: <20170211022800.14138f68@pearl> <CA%2BWntOtWk8ALoVfSUJjB-7iE5iW2sOYQXKcMqDo35T92RuzvYA@mail.gmail.com> <assp.0217334a41.20170213164604.0110b21b@pearl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 13, 2017 at 04:46:04PM -0500, Brett Wynkoop wrote: > On Mon, 13 Feb 2017 15:55:11 -0500 > Joe Nosay <superbisquit@gmail.com> wrote: > > > Is it possible to place the swap on a separate disk such as a usb? > > Yes, but I am not sure what difference that will make. I would think a > swapfile is a swapfile. Yes I am swapping on a file because the image > autogrew the filesystem on first boot, so no chance to set up a > partition. swapfile write requires the write request to come through the filesystem write path, which might require the filesystem to allocate more memory and read some data. E.g. it is known that any ZFS write request allocates memory, and that write request on large UFS file might require allocating and reading an indirect block buffer to find the block number of the written block, if the indirect block was not yet read. As result, swapfile swapping is more prone to the trivial and unavoidable deadlocks where the pagedaemon thread, which produces free memory, needs more free memory to make a progress. Swap write on the raw partition over simple partitioning scheme directly over HBA are usually safe, while e.g. zfs over geli over umass is the worst construction.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170214032036.GR2092>