Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2017 18:27:35 -0700
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        Matthew Seaman <matthew@FreeBSD.org>, freebsd-questions@freebsd.org
Subject:   Re: Subject: Thunderbird causing system crash, need guidance
Message-ID:  <2ae72a98-9584-aee2-bb41-31dbc31250f8@dreamchaser.org>
In-Reply-To: <460ae512-89b6-d09f-b567-fefff373b087@FreeBSD.org>
References:  <201712110045.vBB0jCTQ078476@nightmare.dreamchaser.org> <CA+tpaK0sG31TckxL8orNmAD0ZXSz7rJzEotjsCEtASw9u2COZg@mail.gmail.com> <38e2ef70-fa1b-25bf-4447-752006418d0a@dreamchaser.org> <460ae512-89b6-d09f-b567-fefff373b087@FreeBSD.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 12/11/17 00:56, Matthew Seaman wrote:
> On 11/12/2017 04:56, Gary Aitken wrote:
> 
>>>> md99                  none  swap    sw,file=/usr/swap/swap,late
> 0       0
> 
>>> Your swap configuration is also mostly likely silly.  If you need
>>> more performance, that's not the way to do it.
> 
>> Can you explain or point me to an explanation for this comment?  It
>> looks to me like what's shown in the EXAMPLES section of "man fstab".
> 
> You're swapping to a file-backed memory device, which is not the best
> choice for performance.  The best choice is to swap to raw partitions on
> your hard drives.  Having several disks with a swap partition on each
> can help, as it allows you to spread the IO load over several devices,
> but that's a marginal gain and not necessary in general.
> 
> The reasoning being that you're involving all of the kernel machinery to
> support filesystem IO for what is meant to be the very low-level and
> simplified operation of paging memory in and out of swap.
> 
> Yes, you can create a file-backed swap area, but just because you can
> doesn't mean you should.  Creating a file-backed swap is useful in
> special cases, like you're working on that part of the kernel and need
> to test adding or removing swap devices, or you're trying to cope with
> some exceptional process that is really far too large for your system to
> handle.
> 
> Ideally nowadays you should have enough RAM to contain all of your
> active processes without needing to swap, so the whole point should
> really be moot.

Many thanks for the clarification.

Gary



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?2ae72a98-9584-aee2-bb41-31dbc31250f8>