From owner-freebsd-questions@FreeBSD.ORG Sat Oct 11 02:47:00 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 BFE761065690 for ; Sat, 11 Oct 2008 02:47:00 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE6B8FC19 for ; Sat, 11 Oct 2008 02:47:00 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.2/8.14.2) with ESMTP id m9B2LNXD047865; Fri, 10 Oct 2008 21:21:23 -0500 (CDT) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1223691683; bh=+rOgp3ChPli+M6vCo5Y7kWW3CHMVaG7oreEIhmv 8udY=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=cmFgduqE n+gSPpSXjlpfoI9bZChbh/xphAAhsZyJVQfrwKfF+WnXrB5gfA+tlVkEU+coS36Aclz tptR/nKvE4pXUHNjpxqAqg09C4/ZqJXFgvOsGlUg6ahgj2p/QSC+hhqLjEg/xIcI7wG 1p02SCRiZkXrh0xuzxmLXDIvbn77w= Received: (from tinguely@localhost) by casselton.net (8.14.2/8.14.2/Submit) id m9B2LNsK047864; Fri, 10 Oct 2008 21:21:23 -0500 (CDT) (envelope-from tinguely) Date: Fri, 10 Oct 2008 21:21:23 -0500 (CDT) From: Mark Tinguely Message-Id: <200810110221.m9B2LNsK047864@casselton.net> To: fbsdlists@gmail.com, pprocacci@datapipe.com In-Reply-To: <48EFE927.6000404@datapipe.com> 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: Sat, 11 Oct 2008 02:47:00 -0000 > > 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.