From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 20 15:37:59 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64CEF106566B for ; Tue, 20 Mar 2012 15:37:59 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 960688FC16 for ; Tue, 20 Mar 2012 15:37:58 +0000 (UTC) Received: by lagv3 with SMTP id v3so182343lag.13 for ; Tue, 20 Mar 2012 08:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=bWmAXSrcIs+LSm90+1QdbVKxC8HHZhP0VEUZQx/a+ZU=; b=1JE9tiMghvk8VbO77ibzsO2nbzmCQPYU1Jguh5aaCjJmvqseWMRown5QK/zJJ+RhVj nY9h12V+QmkIyQjvctVRfN27zudpnHrcIWNPLHacx9sRk72WPMmwDlluKbKx86HsT4tT ngVSrvUwwclEXyvFXnp0TFlNsQHpCI1OKeuyocvGype/g3F2+2pj1Kz7779KQkkDM8Z3 A+iRnR6ZMRKu/w0xR1XEFNpwT+fssm+ysur8gvvM2yDKjwcPbWhnhWrHahYsHMYTJXAV z07PuG38krMx7wB691H1K6RGOnNPtRzs8D3S3A/PGCkeHX4H2kgGSWJg2GobxaHFnBH8 ma/w== MIME-Version: 1.0 Received: by 10.112.39.36 with SMTP id m4mr76045lbk.100.1332257877213; Tue, 20 Mar 2012 08:37:57 -0700 (PDT) Received: by 10.152.21.73 with HTTP; Tue, 20 Mar 2012 08:37:57 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Mar 2012 18:37:57 +0300 Message-ID: From: Sergey Kandaurov To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Approaching the limit on PV entries X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 15:37:59 -0000 On 22 November 2011 19:29, Mark Saad wrote: > Hello All [found this mail in my drafts, not sure if my answer is still useful] > =A0I want to get to the bottom of a warning in dmesg. On 7.2-RELEASE and > 7.3-RELEASE I have seen the following warning in dmesg. > > Approaching the limit on PV entries, consider increasing either the > vm.pmap.shpgperproc or the vm.pmap.pv_entry_max sysctl. > > So looking around I see a few posts here and there about how to tune > the sysctls to address the warning however I am not 100% sure what > each value does. > It appears changing vm.pmap.shpgperproc affects the value of > vm.pmap.pv_entry_max . Can someone explain the relationship of the two > sysctls. Also This is how they are calculated. pv_entry_max =3D shpgperproc * maxproc + cnt.v_page_count; and, respectively, shpgperproc =3D (pv_entry_max - cnt.v_page_count) / maxproc; So, changing one sysctl will change another and vice versa. > what pitfalls of changing them are. Not known to me (on amd64 platform). I have had vm.pmap.shpgperproc=3D15000 on 8.1 amd64 with 4G RAM to make some badly written commercial software to work until it was decommissioned to the scrap. > Also why would setting > kern.ipc.shm_use_phys=3D1 =A0effect the pv entries. Is this supposed to > lower the pv entries ? Changing this sysctl with restarting a quite busy PgSQL server helped me to reduce pv entries from 14M to tens of thousands (though that could just coincide with decrease in workload). --=20 wbr, pluknet