From owner-freebsd-stable@FreeBSD.ORG Tue Aug 9 14:37:30 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B58E106566C for ; Tue, 9 Aug 2011 14:37:30 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 52BE58FC0A for ; Tue, 9 Aug 2011 14:37:30 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [10.1.2.70] ([173.200.178.70]) by asmtp024.mac.com (Oracle Communications Messaging Exchange Server 7u4-18.01 64bit (built Jul 15 2010)) with ESMTPSA id <0LPO00L8D0LKEP40@asmtp024.mac.com> for freebsd-stable@freebsd.org; Tue, 09 Aug 2011 07:36:57 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-08-09_06:2011-08-09, 2011-08-08, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=2 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1108090116 From: Chuck Swiger In-reply-to: <4E4143A6.6030307@digsys.bg> Date: Tue, 09 Aug 2011 07:36:56 -0700 Message-id: <935F8EC2-88E0-45A3-BE8B-7210BE223BC5@mac.com> References: <4E4143A6.6030307@digsys.bg> To: Daniel Kalchev X-Mailer: Apple Mail (2.1084) Cc: FreeBSD-STABLE Mailing List Subject: Re: 32GB limit per swap device? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2011 14:37:30 -0000 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 > Date: August 5, 2008 11:29:21 AM PDT > To: Max Laier > Cc: freebsd-stable@freebsd.org, Lin Jui-Nan Eric > 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@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 > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"