32GB limit per swap device?
Chuck Swiger
cswiger at mac.com
Tue Aug 9 14:37:30 UTC 2011
On Aug 9, 2011, at 7:26 AM, Daniel Kalchev wrote:
> I am trying to set up 64GB partitions for swap for a system that has 64GB of RAM (with the idea to dump kernel core etc). But, on 8-stable as of today I get:
>
> WARNING: reducing size to maximum of 67108864 blocks per swap unit
>
> Is there workaround for this limitation?
Apparently, the 32GB swapspace limit is per swap area; you can add up to 4 swap areas so create two or three 32GB swap partitions.
Regards,
--
-Chuck
PS: Older thread with some specific details:
Begin forwarded message:
> From: Matthew Dillon <dillon at apollo.backplane.com>
> Date: August 5, 2008 11:29:21 AM PDT
> To: Max Laier <max at love2party.net>
> Cc: freebsd-stable at freebsd.org, Lin Jui-Nan Eric <ericlin at tamama.org>
> Subject: Re: Max size of one swap slice
>
> :> Recently we found that we can only allocate 32GB for one swap slice.
> :> Does there is any sysctl oid or any kernel option to increase it? Why
> :> we have this restriction?
> :
> :this is a consequence of the data structure used to manage swap space. See
> :sys/blist.h for details. It *seems* that you *might* be able to increase the
> :coverage by decreasing BLIST_META_RADIX, but that's from a quick glance and
> :most certainly not a good idea.
> :
> :However, the blist is a abstract enough API so that you can likely replace it
> :with something that supports 64bit addresses (and thus 512*2^64 bytes of swap
> :space per device) ... but I don't see why you'd want to do something like
> :this. Remember that you need memory to manage your swap space as well!
> :
> :--
> :/"\ Best regards, | mlaier at freebsd.org
> :\ / Max Laier | ICQ #67774661
>
> The core structures can handle 2 billion swap pages == 2TB of swap,
> but the blist code hits arithmatic overflows if a single blist has
> more then (0x40000000 / BLIST_META_RADIX) = 1G/16 = 64M swap blocks,
> or 256GB.
>
> I think the VM/BIO system had additional overflow issues due to
> conversions back and forth between PAGE_SIZE and DEV_BSIZE which
> further restricted the limit to 32GB. Those restrictions may be gone
> now that FreeBSD is using 64 bit block numbers, so you may be able to
> pop it up to 256GB with virtually no effort (but you need to test it
> significantly!).
>
> With some work on the blist code only (not its structures) the arithmatic
> overflow issues could also be resolved, increasing the swap capability
> to 2TB.
>
> I do not recommend changing any of the core blist structure, particularly
> not BLIST_META_RADIX. Just don't try :-). You do NOT want to bump
> the swap block number fields to 64 bits.
>
> Also note that significant memory is used to manage that much swap. It's
> a factor of 1:16384 or so for the blist structures and probably about
> the same amount for the vm_object tracking structures. 32G of swap needs
> around 2-4MB of wired ram.
>
> -Matt
> Matthew Dillon
> <dillon at backplane.com>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
More information about the freebsd-stable
mailing list