From owner-freebsd-hackers Sat Jul 6 22: 2: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 503D937B400 for ; Sat, 6 Jul 2002 22:02:22 -0700 (PDT) Received: from spork.pantherdragon.org (spork.pantherdragon.org [206.29.168.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90C1443E4A for ; Sat, 6 Jul 2002 22:02:21 -0700 (PDT) (envelope-from dmp@pantherdragon.org) Received: from spark.techno.pagans (spark.techno.pagans [4.61.202.145]) by spork.pantherdragon.org (Postfix) with ESMTP id 4A5C2471DA; Sat, 6 Jul 2002 22:02:20 -0700 (PDT) Received: from pantherdragon.org (speck.techno.pagans [172.21.42.2]) by spark.techno.pagans (Postfix) with ESMTP id 28ABDFEBE; Sat, 6 Jul 2002 22:02:14 -0700 (PDT) Message-ID: <3D27CB56.D5BEE938@pantherdragon.org> Date: Sat, 06 Jul 2002 22:02:14 -0700 From: Darren Pilgrim X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon Cc: "Matthew D. Fuller" , 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> <200207062334.g66NYIhS063812@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Matthew Dillon wrote: > 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. Is NSWAP tied to the NSWAPDEV kernel option, or is it the actual number of active swap devices? If the prior, is setting NSWAPDEV to the actual number of swap devices a useful for improving memory usage? Is NSWAPDEV just a compile-time tunable, or is there a sysctl to do the same thing? > * 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). Can VM_SWZONE_SIZE_MAX be tuned down as well, or does the kernel already handle this efficiently enough to keep it at a minimum useful value sized relative to PHYS? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message