Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2012 12:20:55 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org, Alfred Perlstein <bright@mu.org>, Dan Nelson <dnelson@allantgroup.com>, Karl Pielorz <kpielorz_lst@tdx.co.uk>
Subject:   Re: Threaded 6.4 code compiled under 9.0 uses a lot more memory?..
Message-ID:  <1351707655.1120.94.camel@revolution.hippie.lan>
In-Reply-To: <CAJ-VmonCRcu_kLkmy8%2B2R6X5VjUUo-TOK8uT5qW7_aia81=3%2Bg@mail.gmail.com>
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> <20121031172136.GB21003@dan.emsphone.com> <CAJ-VmonCRcu_kLkmy8%2B2R6X5VjUUo-TOK8uT5qW7_aia81=3%2Bg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2012-10-31 at 10:55 -0700, Adrian Chadd wrote:
> .. isn't the default thread stack size now really quite large?
> 
> Like one megabyte large?

That would explain a larger VSZ but the original post mentions that both
virtual and resident sizes have grown by almost an order of magnitude. 

I think the same is true of the jemalloc aspect -- its design makes it
use more virtual address space than phkmalloc when you've got lots of
threads, but that shouldn't make it use so much more physical memory.
I'm not positive of that, but I did notice when we upgraded from 6.x to
8.2 at work, our apps that have many dozens of threads use more virtual
space, but not dramatically as much more physical memory as in the OP's
case.

I think there are some things we should be investigating about the
growth of memory usage.  I just noticed this:

Freebsd 6.2 on an arm processor:

  369 root 1   8  -88  1752K   748K nanslp   3:00  0.00% watchdogd

Freebsd 10.0 on the same system:

  367 root 1 -52   r0 10232K 10160K nanslp  10:04  0.00% watchdogd

The 10.0 system is built with MALLOC_PRODUCTION (without that defined
the system won't even boot, it only has 64MB of ram).  That's a crazy
amount of growth for a relatively simple daemon.

-- Ian





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