From owner-freebsd-questions@FreeBSD.ORG Mon Feb 13 22:13:30 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A006916A422 for ; Mon, 13 Feb 2006 22:13:30 +0000 (GMT) (envelope-from freebsd@rtl.fmailbox.com) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A0FE43D46 for ; Mon, 13 Feb 2006 22:13:30 +0000 (GMT) (envelope-from freebsd@rtl.fmailbox.com) Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 52CADD33FDB; Mon, 13 Feb 2006 17:13:28 -0500 (EST) Received: from web3.messagingengine.com ([10.202.2.212]) by frontend1.internal (MEProxy); Mon, 13 Feb 2006 17:13:28 -0500 Received: by web3.messagingengine.com (Postfix, from userid 99) id 5AC7C259E3; Mon, 13 Feb 2006 17:13:29 -0500 (EST) Message-Id: <1139868809.6940.254283466@webmail.messagingengine.com> X-Sasl-Enc: Mxuud0NAp0EpccUpj45bgXXAg7mtATD/qNmK/g6DnkIX 1139868809 From: "Robert Leftwich" To: "David Scheidt" Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 5022 (F2.73; T1.15; A1.64; B3.05; Q3.03) References: <1139792505.30118.254198744@webmail.messagingengine.com> <43F0434F.2000703@locolomo.org> <1139826617.10634.254226042@webmail.messagingengine.com> <20060213214053.GA20537@panix.com> In-Reply-To: <20060213214053.GA20537@panix.com> Date: Tue, 14 Feb 2006 09:13:29 +1100 Cc: freebsd-questions@freebsd.org Subject: Re: Memory leak? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 22:13:30 -0000 On Mon, 13 Feb 2006 16:40:54 -0500, "David Scheidt" said: > > I've seen (very, very, very, very) large memory leaks on long-lived > Python processes. I haven't looked at it to figure out if it's > python, some module, or the application doing something stupid. But > the processes will grow until they hit their limits. What's your definition of long-lived? My scenario is that I'm processing a particular dataset in Python which is launched by a shell script, once finished (after 30-35mins) the Python app completes and the shell script launches another instance on a new dataset. All memory allocated by the finished Python app should be freed/made inactive shouldn't it? Here's some more data: After a reboot this is what top says: Mem: 45M Active, 13M Inact, 61M Wired, 4K Cache, 60M Buf, 2842M Free Swap: 4068M Total, 4068M Free which totals 3021M After 1 dataset it is: Mem: 107M Active, 1919M Inact, 158M Wired, 16K Cache, 214M Buf, 570M Free Swap: 4068M Total, 4068M Free which totals 2968M While running on the 6th dataset: Mem: 1032M Active, 1045M Inact, 260M Wired, 145M Cache, 214M Buf, 4664K Free Swap: 4068M Total, 108K Used, 4068M Free which totals 2700.6M Are my assumptions incorrect, should the totals displayed by top be at least approximately equal? Robert