From owner-freebsd-questions@FreeBSD.ORG Mon Oct 13 13:21:08 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630E71065689 for ; Mon, 13 Oct 2008 13:21:08 +0000 (UTC) (envelope-from fbsdlists@gmail.com) Received: from mail-gx0-f16.google.com (mail-gx0-f16.google.com [209.85.217.16]) by mx1.freebsd.org (Postfix) with ESMTP id 044938FC1A for ; Mon, 13 Oct 2008 13:21:07 +0000 (UTC) (envelope-from fbsdlists@gmail.com) Received: by gxk9 with SMTP id 9so2731378gxk.19 for ; Mon, 13 Oct 2008 06:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=QE6Kie4RzuXxIySslOnpCcmeDMtjJ1XXDiWjt08F56I=; b=qzJIia/dQW6pevr+C257JL56pM29G0kqplMs/wv5bFVl1GqCiWfA/iAqnIXOPU7Hst gdDFR5UW3I59jYGCzbdakY//i6mvI5mQLq6Kjs5u66dld1pT0JFOjAC4OIQBmOhlfbj0 7r5GTj2TAMcRxAKb6QIJZO/W0mW72CZWPJiNg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=wqdNPV8tKNAje9niPq3dZ243Tiu1h69e/fs3o3TkL7tiDXbsqtGBA2nRT2jSY8zGKH EXh38hllrMCW6KfQhP43Yi2SlyCZafXmZlLOjaIHGQZCYuo+l3eqVPd1QT1MI/1uLauB tBxozHHL0PSyGESm3/jmIle/HjhtNNm3I+cds= Received: by 10.151.157.1 with SMTP id j1mr8127612ybo.103.1223904067282; Mon, 13 Oct 2008 06:21:07 -0700 (PDT) Received: by 10.150.97.11 with HTTP; Mon, 13 Oct 2008 06:21:06 -0700 (PDT) Message-ID: <54db43990810130621s63ea1ec9nc085d79b0c230ad6@mail.gmail.com> Date: Mon, 13 Oct 2008 09:21:06 -0400 From: "Bob Johnson" To: "Mark Tinguely" In-Reply-To: <200810110221.m9B2LNsK047864@casselton.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48EFE927.6000404@datapipe.com> <200810110221.m9B2LNsK047864@casselton.net> Cc: freebsd-questions@freebsd.org Subject: Re: kernel: Approaching the limit on PV entries... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 13:21:08 -0000 On 10/10/08, Mark Tinguely wrote: >> > vm.pmap.pv_entry_count: 583006 >> > vm.pmap.shpgperproc: 200 >> > vm.pmap.pv_entry_max: 2243305 >> > >> > The system: >> > FreeBSD .... 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Wed Oct 1 >> > 07:51:58 UTC 2008 >> > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >> > >> > Can someone briefly explain what this is telling me and how to decide >> > which sysctl to increase? I have found some old postings that predate >> > the sysctls that suggested increasing shpgperproc in the kernel >> > configuration, about 50 at a time until the problem goes away, but I >> > still have no clue what that is accomplishing. > > what (simplified): > the pv_entry helps the virtual memory system track physical pages, so a > physical page can be shared with another process or another virtual address. > > In the i386/amd64 the pv_entry entries are allocated in page size "chunks" > on a per process memory map basis. This helps reduce redundant pointers > and overall saves memory. > > "shpgperproc" can be read as "the number of shared pages per proceess". > pv_entry_max is calculated from shpgperproc (and on the amd64, shpgperproc > can be derived from setting the vm.pmap.pv_entry_max). > > On the amd64, the values can be adjusted by sysctl, but on the i386 > the values must be compiled into the kernel. > > There are some automatic adjustments in the calculation of the number > of pv_entry, but the warnings are given early enough to help aid in the > tweaking of the value. The advice of slowly increasing vm.pmap.shpgperproc > is probably the best solution. I would adjust up slower than 50 (25% > increase seems to be pretty high). > > --Mark Tinguely. > Thanks. I'll see what happens. In amd64/7.0 is there any chance running out of pv_entrys would show up as failures in interprocess communication rather than a panic? The original symptom was that certain web pages (or jailed servers, I'm not sure) were unreachable, as if the firewall were misconfigured, until the system was rebooted. I didn't get to look at the system before it was rebooted, and I find very little in the logs to explain what was going on. Thanks again, - Bob fbsdlists@gmail.com