Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2012 21:04:02 +0200
From:      Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@FreeBSD.org>
To:        Ivan Voras <ivoras@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: SuperPages utilization survey
Message-ID:  <20120601190402.GQ10094@acme.spoerlein.net>
In-Reply-To: <jqac8f$6mn$1@dough.gmane.org>
References:  <jqac8f$6mn$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120601190402.GQ10094>