Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Apr 2015 12:34:09 +0000
From:      "Meyer, Conrad" <conrad.meyer@isilon.com>
To:        Garrett Cooper <yaneurabeya@gmail.com>, "Gumpula, Suresh" <Suresh.Gumpula@netapp.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   RE: BSD 8.1 and 9.1 memory increase
Message-ID:  <A3CAF0E84A34A540B4C74454358E003F370F8673@MX103CL02.corp.emc.com>
In-Reply-To: <CBDA4B8C-D0F5-43C1-9E7E-604EA7DA4BCD@gmail.com>
References:  <D12DE5E5.2F3FB%gsuresh@netapp.com> <D12DE5F8.2F3FE%gsuresh@netapp.com> <D140B84E.34458%gsuresh@netapp.com>, <CBDA4B8C-D0F5-43C1-9E7E-604EA7DA4BCD@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mar 31, 2015, at 17:54, Gumpula, Suresh <Suresh.Gumpula@netapp.com> wr=
ote:=0A=
>=0A=
> Still trying to find out the reason for more memory foot print on 9.1=0A=
> compared to 8.1 .=0A=
> Does some thing like clustering changes in page fault handling cause=0A=
> memory foot print ?=0A=
> https://svnweb.freebsd.org/base?view=3Drevision&revision=3D235876=0A=
>=0A=
> Copying Alan Cox , if could throw some inputs on this.=0A=
=0A=
Superpages and how FreeBSD does its best to put runtime libraries in superp=
age-able comes to mind..=0A=
=0A=
The VMEM for libraries is what caught us off guard last year when dealing w=
ith applications -- more libraries =3D=3D greater footprint past either 8.0=
 or 9.0 because of changes to VM/rtld.=0A=
=0A=
Conrad Meyer had a change out to reduce the footprint for libraries, but it=
 was racy/incomplete unfortunately :/..=0A=
=0A=
Hope that maybe helps...=0A=
=0A=
-----------------------------------=0A=
=0A=
Right. So the linker and RTLD map each binary segment with 2MB virtual page=
s, because that way you only need one mapping / TLB entry per segment (or a=
t 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 .=0A=
=0A=
To summarize: larger-than-necessary superpage mappings affect only vmem acc=
ounting; actually use less resources (PTE's and any additional per-PTE vm a=
ccounting) than 4k pages; and use fewer TLB entries. Unmapping the unused p=
ortions is useless even if you get it right.=0A=
=0A=
Are you actually seeing greater memory footprint, or just greater vmem foot=
print? I don't actually use FreeBSD8 or 9.=0A=
=0A=
Cheers,=0A=
Conrad=



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