From owner-freebsd-questions@FreeBSD.ORG Thu Oct 17 15:26:20 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B326D800 for ; Thu, 17 Oct 2013 15:26:20 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [IPv6:2a00:1450:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9C429F6 for ; Thu, 17 Oct 2013 15:26:20 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id u56so2456549wes.33 for ; Thu, 17 Oct 2013 08:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=pigvIBU0xOLZXhvKpivHLuo0qpfhq7wvVYm6mEe4g9E=; b=h00pKjz/IB8qzQTgnfMdO6GCRvMTnDyOXYVhp4p/yr9hUFf7YQerC6OUJWQvHoSQNS OlO9nxjzmgzoQEITFhwE73inPAgpZ6Ac6cUOQTKJc2b5V5Cct6AghyPmcsKW9BAd1Hkg jiUjuCJ77XufDfZ1x/Z1wKG0y946VhXbAQaxGLSt1j7wkVhfDF7a0pMCddh9if85zpvD xDdtE6ae4atPOHV7YC0rm8XC5Ha0LdxGKAlM/nkphTFVnCsw6GpvRXFmLhxyKmoCQ/lO Q0CFz6YFpxec867qh3OiK2fcmim0EJ8VSS9pSGRAIDBD0SP9Pb3ms/MhnxTfkx/tv3qu T+TA== X-Received: by 10.194.175.66 with SMTP id by2mr2214205wjc.59.1382023578489; Thu, 17 Oct 2013 08:26:18 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPSA id dq11sm17279028wid.3.2013.10.17.08.26.17 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 17 Oct 2013 08:26:17 -0700 (PDT) Date: Thu, 17 Oct 2013 16:26:16 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: warning: total configured swap (8960911 pages) exceeds maximum recommended amount (8243200 pages). Message-ID: <20131017162616.70795c30@gumby.homeunix.com> In-Reply-To: <201310171404.r9HE4ouQ018448@mech-cluster241.men.bris.ac.uk> References: <201310171404.r9HE4ouQ018448@mech-cluster241.men.bris.ac.uk> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 15:26:20 -0000 On Thu, 17 Oct 2013 15:04:50 +0100 (BST) Anton Shterenlikht wrote: > I'm using a 72gb swap disk. > I've 10gb RAM > > I get this warning: > > warning: total configured swap (8960911 pages) exceeds maximum > recommended amount (8243200 pages). warning: increase kern.maxswzone > or reduce amount of swap. > > What is max. recommended amount based on? > What is the danger of exceeding it? > How should I increase kern.maxswzone? > > # sysctl kern.maxswzone > kern.maxswzone: 0 > # > > Do I set it to the total swap size? > Where is kern.maxswzone described? $ sysctl -d kern.maxswzone kern.maxswzone: Maximum memory for swap metadata see also loader(8) However setting kern.maxswzone can only be used to reduce the metadata size below the default, not increase it. from swap_pager.c: n = cnt.v_page_count / 2; if (maxswzone && n > maxswzone / sizeof(struct swblock)) n = maxswzone / sizeof(struct swblock); n2 = n;