From owner-freebsd-hackers Sat Jul 6 22:10: 1 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 D065537B400 for ; Sat, 6 Jul 2002 22:09:57 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DE7943E31 for ; Sat, 6 Jul 2002 22:09:57 -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 g6759sLA065171; Sat, 6 Jul 2002 22:09:54 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g6759snY065170; Sat, 6 Jul 2002 22:09:54 -0700 (PDT) (envelope-from dillon) Date: Sat, 6 Jul 2002 22:09:54 -0700 (PDT) From: Matthew Dillon Message-Id: <200207070509.g6759snY065170@apollo.backplane.com> To: Darren Pilgrim 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> <3D27CB56.D5BEE938@pantherdragon.org> 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 :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? Sorry, I meant NSWAPDEV there. :> 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? The kernel handles this fairly well now. It didn't used to. The limit exists to prevent the kernel from reserving absurd amounts of KVM for swblock's on systems with lots of memory (like 2G or 4G of ram). The amount of KVM reserved for systems with less physical ram is fairly small and you don't have to worry about it. Also, this is just KVM. Real ram is only allocated for swblock structures when you actually start paging to swap (the bitmaps are preallocated but the space for the swblock structures is not). The only time you would need to tune these parameters would be if you really needed to configure more then around 14GB of swap and have it all be useable by the system. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message