memory warnings r240891 | dmesgg

Peter Jeremy peter at rulingia.com
Sun Oct 7 01:53:08 UTC 2012


On 2012-Oct-04 23:51:09 +0400, Sergey Kandaurov <pluknet at gmail.com> wrote:
>On 4 October 2012 20:18, Darrel <levitch at iglou.com> wrote:
>> warning: total configured swap (2621440 pages) exceeds maximum
>> recommended amount (1852656 pages).
...
>This is because kernel needs some memory to manage swap too.
>Currently for amd64 this roughly reduces to the following rule
>(My apologies in advance for the extra simplification):
>
>100MB RAM per 800MB swap space.

That is oversimplified to the point of being wrong.  As of HEAD
r239255 and 9-stable r240097, there's no longer a limit on amd64.  The
limit is still required on 32-bit architectures due to the limited KVA
available.

The actual KVA requirements (RAM is only allocated when the swap space
is actually used) is about 5MB KVA per 1GB swap.  The default swzone
for i386 was 32MiB - which is sufficient for ~7GB swap (the 1852656
pages reported above) and was increased to 34.5MB for i386 in r239730
to support ~8GB swap (this is also in r240097).  (It's all approximate
because of the way swap space is allocated using struct swblock).

See the thread starting
http://lists.freebsd.org/pipermail/freebsd-current/2012-August/035839.html
for more details.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20121007/5e1e085d/attachment.pgp


More information about the freebsd-current mailing list