From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 1 19:04:04 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 7556F106564A; Fri, 1 Jun 2012 19:04:04 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id E7F418FC08; Fri, 1 Jun 2012 19:04:03 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.5/8.14.5) with ESMTP id q51J42GV090075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 1 Jun 2012 21:04:02 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Fri, 1 Jun 2012 21:04:02 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Ivan Voras Message-ID: <20120601190402.GQ10094@acme.spoerlein.net> Mail-Followup-To: Ivan Voras , freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.org Subject: Re: SuperPages utilization survey 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: Fri, 01 Jun 2012 19:04:04 -0000 On Fri, 2012-06-01 at 14:23:42 +0200, Ivan Voras wrote: > hello, > > I was wondering how much usage superpages get in real-world systems, and > made a small script to parse the output of "procstat -va": > > http://people.freebsd.org/~ivoras/stuff/spsurvey.py > > The results from three systems (with the script being run as root) are here: > > http://people.freebsd.org/~ivoras/stuff/spsurvey_desktop.txt > http://people.freebsd.org/~ivoras/stuff/spsurvey_mixserver.txt > http://people.freebsd.org/~ivoras/stuff/spsurvey_webserver.txt > > What I get from it is that they are really under-utilized, probably > because it's a rare occasion that every single page in a 2 MB region is > touched to enable its promotion. > > The only good case seems to be the third one, with the database > accessing the whole memory range a lot, but the statistics which > procstat reports is inaccurate: there could be only a single superpage > in the whole region and procstat will make the region with the "S" flag. > > If there's anyone else wishing to run the script and post the results, > it could be useful to see. Here's output of a machine doing basically nothing all day: % fetch -o- http://people.freebsd.org/\~ivoras/stuff/spsurvey.py | sudo python - - 100% of 2035 B 664 kBps last pid: 20460; load averages: 0.04, 0.01, 0.00 up 2+01:35:37 21:01:08 49 processes: 1 running, 48 sleeping Mem: 104M Active, 2079M Inact, 1593M Wired, 34M Cache, 418M Buf, 133M Free Swap: 4096M Total, 1376K Used, 4095M Free Total accounted memory mappings: 1669 MB (427314 pages) Memory in superpages: 12 MB (2 mappings) + pid: 864 (named) start: 802800000 stop: 803000000 (8 MB) tp: df path: + pid: 1002 (slapd) start: 805400000 stop: 805800000 (4 MB) tp: df path: Eligible mappings not promoted: 66 ... Also, what about kernel mappings? With ZFS and stuff there should be more superpages in kernel memory, no? Uli