Hi All, 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?
On Tue, Aug 05, 2008 at 11:39:11PM +0800, Lin Jui-Nan Eric wrote:> ... > Recently we found that we can only allocate 32GB for one swap slice.Yes.> Does there is any sysctl oid or any kernel option to increase it? Why > we have this restriction?I don't know why, though I suspect it may have something to do with the way storage in the swap space is allocated & addressed. You may, however, have more than 1 swap space. (Per man pages for swapon(8) and swapoff(8), the default maximum is 4.) Peace, david -- David H. Wolfskill david@catwhisker.org I submit that "conspiracy" would be an appropriate collective noun for cats. See http://www.catwhisker.org/~david/publickey.gpg for my public key. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20080805/713b483a/attachment.pgp
On Aug 5, 2008, at 8:39 AM, Lin Jui-Nan Eric wrote:> 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 size limitation likely predates the availability of disks larger than 32GB. It's hard to conceive of why you'd want to add so much swap space, anyway-- if you've got programs which actually need to deal with 10s of gigabytes worth of data, then they ought to maintain a smaller/ reasonable-sized working set in RAM and do disk I/O as needed themselves rather than depend upon the VM pager, anyways. (Well, when using a BSD-derived kernel, anyways. Some of the Mach kernels support userland VM pager implementations, so that things like a database or Photoshop can provide their own pager which understands their workload and chooses which pages to evict or replace better than the default system pager algorithm can.) Regards, -- -Chuck
On Tuesday 05 August 2008 17:39:11 Lin Jui-Nan Eric wrote:> 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@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News