From owner-freebsd-hackers Sat Jul 6 16:34:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4716737B400 for ; Sat, 6 Jul 2002 16:34:23 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5A3343E31 for ; Sat, 6 Jul 2002 16:34:22 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g66NYILA063813; Sat, 6 Jul 2002 16:34:18 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g66NYIhS063812; Sat, 6 Jul 2002 16:34:18 -0700 (PDT) (envelope-from dillon) Date: Sat, 6 Jul 2002 16:34:18 -0700 (PDT) From: Matthew Dillon Message-Id: <200207062334.g66NYIhS063812@apollo.backplane.com> To: "Matthew D. Fuller" Cc: Darren Pilgrim , ticso@cicely.de, freebsd-hackers@FreeBSD.ORG Subject: Re: How does swap work address spacewise? References: <20020705113532.GA11273@atrbg11.informatik.tu-muenchen.de> <20020705133515.GA295@HAL9000.wox.org> <20020705133837.GA513@HAL9000.wox.org> <20020705234126.GA12183@atrbg11.informatik.tu-muenchen.de> <3D2640A7.3EA2236B@pantherdragon.org> <20020706020656.GL48977@cicely5.cicely.de> <3D2762FE.9D9E0378@pantherdragon.org> <20020706215220.GG5512@over-yonder.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :... :> :> Up to four, so then the theoretical limit for swap is 8TB? : :I hope not, since I have 6 of 'em. 4's just the default. : : :> Do these management structures grow as swap grows, or do they only :> change as the utilization increases? : :I believe they're pre-allocated, so it's the size of swap configured (not :used) that eats it. : :-- :Matthew Fuller (MF4839) | fullermd@over-yonder.net The nominal limit for swap space is around 14 GB due to limitations in available KVM. There are three major limiting factors in the kernel: * The swap bitmap eats 2 bits per page of swap. The bitmap is sized to handle NSWAP (default 4) x size_of_largest_swap_partition. * The system has to keep track of pages that are swapped out. The system reserves 8 x worth of KVM to keep track of swapped out pages. A machine with 4G of ram reserves enough KVA to hold 32GB worth of swapped out pages. * The system limits the size of the above zone to VM_SWZONE_SIZE_MAX, which is typically around 70 MB of KVM (enough to hold 14 GB worth of swap mappings). So the nominal limit is around 14 GB on a 32 bit architecture. With tuning this limit can be bumped up, but the practical limit is going to be around 60GB unless you give the kernel more KVA (reducing the amount of VM a user process can access). On 64 bit architectures the only real limitation is how much physical memory one is willing to burn to hold active swap mappings. And, no, there are no plans to swap out the swap mappings themselves... that would be a complete waste of effort. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message