From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 31 18:52:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6A0BD56 for ; Wed, 31 Oct 2012 18:52:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8C82B8FC08 for ; Wed, 31 Oct 2012 18:52:07 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so830873dad.13 for ; Wed, 31 Oct 2012 11:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=sYKknIm4TC3vQ4OunqnLRXTJ8Qj9RwL+2yPfSF3bq3g=; b=eLrERvJjsm1rBjo5LZyzx7elZzg+GwifsB9XwTP+U68vrdykuNoElFBoDGFB6GuFJ9 DdwLFiwIgtEcP7hSVFrTZOK8Rzx5+435G7HvY3avtM0BF5ZMnfE9kn4FclOv6CQBcPcT 25CJ1Ff88q3R+HnKxUnJJyQCkW8x5KYVLHMTN4v9i6k2boEEmtg1kjQm1rgAmwrOnrfd ZBwECo/tICC32vJhghrxubb9cojm5to/Z/cdZiBCAgxlTAE6GJAXFaifSDtkYOA5117p oTi8HfDYYCchX2FAR6A7ICjF2xxokvs46YEht9AAWyYQCbWBtbuElFUHHefD6navDW+p S/mg== MIME-Version: 1.0 Received: by 10.66.79.168 with SMTP id k8mr104192458pax.12.1351709527012; Wed, 31 Oct 2012 11:52:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Wed, 31 Oct 2012 11:52:06 -0700 (PDT) In-Reply-To: <1351707655.1120.94.camel@revolution.hippie.lan> References: <20121030182727.48f5e649@X220.ovitrap.com> <20121030194307.57e5c5a3@X220.ovitrap.com> <615577FED019BCA31EC4211B@Octca64MkIV.tdx.co.uk> <509012D3.5060705@mu.org> <20121030175138.GA73505@kib.kiev.ua> <20121031140630.GE73505@kib.kiev.ua> <20121031172136.GB21003@dan.emsphone.com> <1351707655.1120.94.camel@revolution.hippie.lan> Date: Wed, 31 Oct 2012 11:52:06 -0700 X-Google-Sender-Auth: 0K7o42qGQ3Q5S7hlypZ3dQA1iGA Message-ID: Subject: Re: Threaded 6.4 code compiled under 9.0 uses a lot more memory?.. From: Adrian Chadd To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, Alfred Perlstein , Dan Nelson , Karl Pielorz X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 18:52:07 -0000 On 31 October 2012 11:20, Ian Lepore wrote: > 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. Would you please, _please_ do some digging into this? It's quite possible there's something in the libraries that are allocating some memory upon first call invocation - yes, that's jemalloc, but it could also be other things like stdio. We really, really need to fix this userland bloat; it's terribly ridiculous at this point. There's no reason a watchdog daemon should take 10megabytes of RAM. Thanks, Adrian