Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 2015 15:04:52 -0700
From:      kah42pub <kah42pub@blarg.com>
To:        freebsd-arm@freebsd.org
Subject:   Re: swap questions freebsd11/arm6
Message-ID:  <55EF5B84.4080403@blarg.com>
In-Reply-To: <20150908162309.GA929@potato.growveg.org>
References:  <20150908162309.GA929@potato.growveg.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/8/15 09:23, John wrote:
> Hello list,
> 
> sorry about all my questions. I'm learning, honest.
> 
> OK I found that having a swapfile after the fact, makes it not appear in
> top. It seemed that some of the system saw the swap at /usr/swap0 but
> other parts didn't use it. So in an effort to get around this, I
> got another spare usb stick and put swap on it. The stick is 16GB.
> 
> I now get the folllowing in messages:
> 
> Sep  8 15:26:34 potato kernel: warning: total configured swap (3906304 pages) 
> exceeds maximum recommended amount (223328 pages).                                                                                                    
> Sep 8 15:26:34 potato kernel: warning: increase kern.maxswzone or reduce 
> amount of swap.                                                                                                                                           
> 
> Thing is, I'd quite like a huge amount of swap given the following:
> 
> 1. not too concerned about speed here, as long as it's stable
> 2. things like svnlite choke on many writes
> 
> There's not much documentation about kern.maxswzone. I put the
> following in /boot/loader.conf :
> 
> kern.maxswzone=3906304
> 
> it still complains.
> 
> Please can anyone give pointers how to fix this?
> thanks,
> 

I'm not an expert on this topic so take it with a grain of salt...

Looking through my old notes, I have a reference that the maximum swap
space for FreeBSD was 8X the available memory.  Note that this is
available memory which is reported by the kernel during boot and not
physical memory.  They are likely not the same.  This is dmesg output
from a RPI2 card I have running as an example:

real memory  = 989851648 (943 MB)
avail memory = 958476288 (914 MB)


At the time I made the notation, it didn't appear to be possible to have
more than this amount without one, or more, kernel patches so I didn't
bother with it (this was probably back in the FreeBSD 8 time frame...
maybe... so I don't know if anything has changed since then).

I have two default configurations for FreeBSD on armv6.  One is without
any swap defined where I know it will never be needed (card is dedicated
to one task).

The second (for more general purposes) is with 4X physical memory
defined for more general purpose (multi-core) cards.

For this type of question, I'd probably post it to the hackers mailing
list.  That group may have more experience and/or insight into that
tuning parameter and large swap spaces.

Hope that helps.

Kris






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