From owner-freebsd-stable@FreeBSD.ORG Thu Feb 5 09:38:42 2009 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41D0010656C9 for ; Thu, 5 Feb 2009 09:38:42 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 8BFE38FC1A for ; Thu, 5 Feb 2009 09:38:41 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by ewy14 with SMTP id 14so202621ewy.19 for ; Thu, 05 Feb 2009 01:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=HyMgep6p9AIINSEfCBe8iTZkmh27IHjxt6xhcw/9OiI=; b=KyB0nGEpwcBdOQGNknQ+8wfC/Y9EI+vS3+Kvcb5+NNcedZs9YQCZAlo6nECtqAKcCo yg9t0wDMD8g5ajpouiDQdnUCTM9wLAaQD7D5ahRjejHtezgkbZeuFSz14f3CWPA3bRz7 cc1Rh5evm3JsidVbKSxJJZNmrlDdU/zsuIa4Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=OKOL6/lWIJArtxcu/SfJ9weGHevZGTtcjJXEseM2mreRNLxFmg+973oBYjkOmWeUpi HZ3IzZZ5R2JyqqWNcJhcM/oS4d1NkdO2roRJ8cItQqm+eZn7urucEaGkluw0fCdLiVIU MAsI72fGnYqJhyrEFHJku88MKVMINxK7g7D98= Received: by 10.210.44.19 with SMTP id r19mr209693ebr.194.1233826719895; Thu, 05 Feb 2009 01:38:39 -0800 (PST) Received: from ?127.0.0.1? (87-194-39-182.bethere.co.uk [87.194.39.182]) by mx.google.com with ESMTPS id j8sm252526gvb.21.2009.02.05.01.38.38 (version=SSLv3 cipher=RC4-MD5); Thu, 05 Feb 2009 01:38:39 -0800 (PST) From: Tom Evans To: Tomas Randa In-Reply-To: <4989D384.7090301@max.af.czu.cz.cz> References: <4989BD92.9010506@max.af.czu.cz.cz> <1233766887.43076.18.camel@strangepork.mintel.co.uk> <4989D384.7090301@max.af.czu.cz.cz> Content-Type: text/plain Date: Thu, 05 Feb 2009 09:39:49 +0000 Message-Id: <1233826789.43076.25.camel@strangepork.mintel.co.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org Subject: Re: Free memory after upgrade to 7.1 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 09:38:52 -0000 On Wed, 2009-02-04 at 18:42 +0100, Tomas Randa wrote: > Yes, I do portupgrade -Rrfia after upgrade of course. > I don`t think it is some "new" PHP bug, because my friend have same > problem with memory and he do not upgraded ports. But his box do not > free memory after apache reload, my yes > > Any other suggestions ? > > Thanks TR > > > > Tom Evans napsal(a): > > On Wed, 2009-02-04 at 17:08 +0100, Tomas Randa wrote: > > > >> Hello, > >> > >> I have i386/PAE system (php, apache22, mysql) running on 7-STABLE and I > >> can see strange behavior after upgrade from 7.0: Apache does not free > >> memory, for example: > >> > >> CPU: 31.2% user, 0.0% nice, 12.8% system, 0.7% interrupt, 55.3% idle > >> Mem: 3520M Active, 3705M Inact, 465M Wired, 314M Cache, 112M Buf, 12M Free > >> Swap: 4096M Total, 105M Used, 3991M Free, 2% Inuse > >> > >> then apachectl graceful > >> > >> CPU: 28.3% user, 0.0% nice, 8.6% system, 0.0% interrupt, 63.1% idle > >> Mem: 631M Active, 3126M Inact, 353M Wired, 213M Cache, 112M Buf, 3693M Free > >> Swap: 4096M Total, 1844K Used, 4094M Free > >> > >> Some graph: http://max.af.czu.cz/memoryload.png > >> > >> I know before upgrade was memory using about 2,5GB, now much more, > >> apache sometimes crash. > >> > >> Thanks for some help > >> > >> Tomas Randa > >> > > > > What is apache doing to use so much memory? This looks more like a > > memory leak in PHP, which is reclaimed after apache restarts its > > children. > > > > When you upgraded the OS, did you also upgrade ports? Could a new > > version of PHP be at fault here? > > > > Cheers > > > > Tom > > Well, apache + its regular modules dont tend to leak memory, which is what is happening. Can you run tests, eg by running your application on apache with valgrind, to determine exactly where the leak occurs. Tom