Re: swapfile query

From: Cy Schubert <Cy.Schubert_at_komquats.com>
Date: Sat, 19 Aug 2017 09:54:08 -0700
In message <77fdd002-2873-eb67-c851-0127ae3141b6_at_zyxst.net>, tech-lists 
writes:
> Hello list,
> 
> (freebsd-current is r317212 on this machine)
> 
> I have a machine with 128GB RAM. When 12-current was installed, for some
> reason the swap partition was set to 4GB. I see sometimes via top and
> also via daily status reports that sometimes the machine runs out of
> swap. It doesn't crash the machine though.
> 
> I know how to add more swap with a swapfile. My questions are:
> 
> 1. should I make more than one swapfile, say 4x32GB or will it be ok
> with one 128GB swapfile?

It's better to spread the load across multiple spindles.

> 
> 2. will the 4GB already there as swap play nice with a swapfile, or
> multiple swapfiles? Or should I deactivate the 4GB swap partition first?

Is the 4 GB on the same disk as another swapfile?

> 
> 3. should total swap be 1x 2x or some other multiple of RAM these days?

Depends. If you're running some kind of database server or OLTP 
application. Some vendors recommend no swap whatsoever while others 
recommend some. What does your application vendor recommend?

> 
> FreeBSD and the swap partition reside on the same SSD. The swapfiles, if
> created, will reside on this SSD.

Then it doesn't matter if you use one or many swapfiles and deleting the 4 
GB won't make a difference. Just add the desired swap as required.

With 128 GB RAM you shouldn't be swapping anyway. If your system is you 
have more serious problems than the lack of swap.

-- 
Cheers,
Cy Schubert <Cy.Schubert_at_cschubert.com>
FreeBSD UNIX:  <cy_at_FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.
Received on Sat Aug 19 2017 - 14:54:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC