Date: Wed, 31 Oct 2012 16:53:43 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Karl Pielorz <kpielorz_lst@tdx.co.uk> Cc: freebsd-hackers@freebsd.org, Alfred Perlstein <bright@mu.org> Subject: Re: Threaded 6.4 code compiled under 9.0 uses a lot more memory?.. Message-ID: <20121031145343.GI73505@kib.kiev.ua> In-Reply-To: <E098A4DED6FCBCD6E248DF22@MightyAtom.tdx.co.uk> References: <A92CE63E6E6DB93B366F4A42@MightyAtom.tdx.co.uk> <20121030182727.48f5e649@X220.ovitrap.com> <E46B717DCFC9273E8BEC5100@MightyAtom.tdx.co.uk> <20121030194307.57e5c5a3@X220.ovitrap.com> <615577FED019BCA31EC4211B@Octca64MkIV.tdx.co.uk> <509012D3.5060705@mu.org> <20121030175138.GA73505@kib.kiev.ua> <C25F1D47C8D6BA6E3A072D4B@MightyAtom.tdx.co.uk> <20121031140630.GE73505@kib.kiev.ua> <E098A4DED6FCBCD6E248DF22@MightyAtom.tdx.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
--Guq+xBHXhbnAFmh4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 31, 2012 at 02:44:05PM +0000, Karl Pielorz wrote: >=20 >=20 > --On 31 October 2012 16:06 +0200 Konstantin Belousov <kostikbel@gmail.com= >=20 > wrote: >=20 > > Since you neglected to provide the verbatim output of procstat, nothing > > conclusive can be said. Obviously, you can make an investigation on your > > own. >=20 > Sorry - when I ran it this morning the output was several hundred lines -= I=20 > didn't want to post all of that to the list 99% of the lines are very=20 > similar. I can email it you off-list if having the whole lot will help? Just put is somewhere on http server and provide the URL. >=20 > >> Then there's a bunch of 'large' blocks e.g.. > >> > >> PID START END PRT RES PRES REF SHD FL TP > >> PATH 2010 0x801c00000 0x802800000 rw- 2869 0 4 0 > >> ---- df 2010 0x802800000 0x803400000 rw- 1880 0 1 = 0 > > > > Most likely, these are malloc arenas. >=20 > Ok, that's the heaviest usage. So it is, most likely, either app doing more malloc allocations, or the difference is due to more aggressive jemalloc behaviour. If this indeed bothers you, you could try to use plug-in replacements for malloc. They are usually LD_PRELOAD'ed, search the ports. But I would not bother. >=20 > >> Then lots of 'little' blocks, > >> > >> 2010 0x7ffff0161000 0x7ffff0181000 rw- 16 0 1 0 ---D = df > > > > And those are thread stacks. >=20 > Ok, lots of those (lots of threads going on) - but they're all pretty sma= ll. >=20 > My code only has a single call to malloc, which allocates around 20k per= =20 > thread. You should look both at the virtual address space allocation for the block, which is specified by (start, end), and at the actual resident page count. >=20 > Obviously there's other libraries and stuff running with the code - so=20 > would I be correct in guessing that they are more than likely for most of= =20 > these large blocks? No idea. --Guq+xBHXhbnAFmh4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCRO3YACgkQC3+MBN1Mb4i5igCgvDPzvpZt7hl6jyrKSons+/Qn Px4An0/cclUcbodTcwaDnmRfGhCWQzPw =DYLE -----END PGP SIGNATURE----- --Guq+xBHXhbnAFmh4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121031145343.GI73505>