From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 3 18:11:19 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 ABA458B6; Sat, 3 Nov 2012 18:11:19 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id E2E2B8FC08; Sat, 3 Nov 2012 18:11:18 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so4157145lbd.13 for ; Sat, 03 Nov 2012 11:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=UMd+0dh2KhvR9xEGc88FipKn09XTJrxFAYnBfJ1zEfE=; b=B9q/9HsNtpTeDYojD6Swk4fswrvb4B0DfQjoarOw+JKjOqZPBUKGl7pq9+rJl+j/lx gfk8vkmTHRleuqoBESrfaH87oDQNBLOnPYU0Y9SoSdsK1wlT3VZ07ucmhMHZgII2tMSB sRoJsf47Po7nyWZUeY8HP4ZI0wFQPDnQR59LKPeG58fK6OHCJ0t7CqR7kr9z+OqlEzFh gUPsKOtR3OQw0NZMkEL6Sw53NcvhwvZ9Pz9pj4zzc7wu0pmAp89FR8Gme63UsT91Xpry h6R+DWjQEVeS27FAUawHyJIZXT7LxiFQ2iKS8Hka8lPi5enIzdqOE1vXDQoNdS9sD6CE FBfA== MIME-Version: 1.0 Received: by 10.152.103.243 with SMTP id fz19mr4811745lab.27.1351966277775; Sat, 03 Nov 2012 11:11:17 -0700 (PDT) Received: by 10.114.61.103 with HTTP; Sat, 3 Nov 2012 11:11:17 -0700 (PDT) In-Reply-To: <20121031190623.GL73505@kib.kiev.ua> References: <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> <20121031190623.GL73505@kib.kiev.ua> Date: Sat, 3 Nov 2012 13:11:17 -0500 Message-ID: Subject: Re: Threaded 6.4 code compiled under 9.0 uses a lot more memory?.. From: Alan Cox To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Ian Lepore , Adrian Chadd , freebsd-hackers@freebsd.org, Alfred Perlstein , Dan Nelson , Karl Pielorz X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: alc@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2012 18:11:19 -0000 On Wed, Oct 31, 2012 at 2:06 PM, Konstantin Belousov wrote: > On Wed, Oct 31, 2012 at 11:52:06AM -0700, Adrian Chadd wrote: > > 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. > Watchdogd was recently changed to mlock its memory. This is the cause > of the RSS increase. > > Is it also statically linked? Alan