BSD 8.1 and 9.1 memory increase

Meyer, Conrad conrad.meyer at isilon.com
Wed Apr 1 12:34:36 UTC 2015


> On Mar 31, 2015, at 17:54, Gumpula, Suresh <Suresh.Gumpula at netapp.com> wrote:
>
> Still trying to find out the reason for more memory foot print on 9.1
> compared to 8.1 .
> Does some thing like clustering changes in page fault handling cause
> memory foot print ?
> https://svnweb.freebsd.org/base?view=revision&revision=235876
>
> Copying Alan Cox , if could throw some inputs on this.

Superpages and how FreeBSD does its best to put runtime libraries in superpage-able comes to mind..

The VMEM for libraries is what caught us off guard last year when dealing with applications -- more libraries == greater footprint past either 8.0 or 9.0 because of changes to VM/rtld.

Conrad Meyer had a change out to reduce the footprint for libraries, but it was racy/incomplete unfortunately :/..

Hope that maybe helps...

-----------------------------------

Right. So the linker and RTLD map each binary segment with 2MB virtual pages, because that way you only need one mapping / TLB entry per segment (or at least, up to 2MB... most libraries are much smaller than this). This is a performance optimization. The discussion around unmapping unused portions of the 2MB range can be found here: https://reviews.freebsd.org/D1263 .

To summarize: larger-than-necessary superpage mappings affect only vmem accounting; actually use less resources (PTE's and any additional per-PTE vm accounting) than 4k pages; and use fewer TLB entries. Unmapping the unused portions is useless even if you get it right.

Are you actually seeing greater memory footprint, or just greater vmem footprint? I don't actually use FreeBSD8 or 9.

Cheers,
Conrad


More information about the freebsd-hackers mailing list