From owner-freebsd-questions@FreeBSD.ORG Tue Feb 14 00:00:48 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 5236F16A44A for ; Tue, 14 Feb 2006 00:00:48 +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 A9D5243D45 for ; Tue, 14 Feb 2006 00:00:47 +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 C441FD34579; Mon, 13 Feb 2006 19:00:45 -0500 (EST) Received: from web3.messagingengine.com ([10.202.2.212]) by frontend1.internal (MEProxy); Mon, 13 Feb 2006 19:00:45 -0500 Received: by web3.messagingengine.com (Postfix, from userid 99) id D6037259F5; Mon, 13 Feb 2006 19:00:46 -0500 (EST) Message-Id: <1139875246.18972.254292031@webmail.messagingengine.com> X-Sasl-Enc: vCXNWslnE175ZpKYpAN0y7fNUExgsXBH+TjaSzsVKy9e 1139875246 From: "Robert Leftwich" To: "Charles Swiger" 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> <1139868809.6940.254283466@webmail.messagingengine.com> <5A1E3F19-24CD-42ED-A945-A37E57EB8748@mac.com> In-Reply-To: <5A1E3F19-24CD-42ED-A945-A37E57EB8748@mac.com> Date: Tue, 14 Feb 2006 11:00:46 +1100 Cc: "freebsd-questions@freebsd.org List" 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: Tue, 14 Feb 2006 00:00:48 -0000 On Mon, 13 Feb 2006 17:58:07 -0500, "Charles Swiger" said: > On Feb 13, 2006, at 5:13 PM, Robert Leftwich wrote: > > Possibly your database is using lots of SysV shared memory, which > would explain why "wired" is going up so much, otherwise perhaps > something in the kernel is leaking. "sysctl kern.malloc" might be > interesting to consider. What should I be looking for? The maximum MemUse is devbuf 2039 8340K, the max InUse is sysctloid 3613 176K. > > > Are my assumptions incorrect, should the totals displayed by top be at > > least approximately equal? > > Exclude the "buf" entry from your math, that will be closer. You > should be looking further down at the SIZE column to see which > processes are using so much RAM... > I can't see anything that explains the discrepancy. Below is the top -o size after a reboot, followed by the current top after 8 datasets (the extra python process is the analysis app - at a low memory usage point): (Note that the original 2 python processes are web servers and that I have 3 postgres clusters running on different ports, pending a move to separate machines - assuming I can solve this problem) PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 599 msf 1 4 0 75256K 25408K accept 1 0:00 0.00% python 582 msf 1 76 0 53772K 5580K select 0 0:00 0.00% postgres 575 msf 1 76 0 53748K 5288K select 0 0:00 0.00% postgres 588 msf 1 76 0 53588K 5360K select 0 0:00 0.00% postgres 574 msf 1 76 0 53564K 5060K select 0 0:00 0.00% postgres 586 msf 1 76 0 52140K 14988K select 0 0:00 0.00% python 601 root 1 4 0 29388K 3944K sbwait 1 0:00 0.00% sshd 604 msf 1 76 0 29364K 3996K select 1 0:00 0.00% sshd 578 msf 1 76 0 29224K 5472K select 0 0:00 0.00% postgres 576 msf 1 76 0 29216K 5372K select 0 0:00 0.00% postgres 583 msf 1 76 0 20488K 5224K select 0 0:00 0.00% postgres 589 msf 1 76 0 20488K 4988K select 0 0:00 0.00% postgres 579 msf 1 76 0 20484K 5220K select 0 0:00 0.00% postgres 580 msf 1 81 0 19548K 5284K select 1 0:00 0.00% postgres 584 msf 1 77 0 19536K 5260K select 1 0:00 0.00% postgres 590 msf 1 76 0 19512K 5012K select 1 0:00 0.00% postgres PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 2256 msf 4 20 0 83228K 31876K kserel 1 0:01 0.00% python 2257 msf 1 4 0 56340K 19836K sbwait 1 0:00 0.00% postgres 582 msf 1 76 0 53920K 36916K select 0 0:11 0.00% postgres 575 msf 1 76 0 53748K 3948K select 0 0:00 0.00% postgres 588 msf 1 76 0 53708K 36704K select 0 0:03 0.00% postgres 574 msf 1 76 0 53564K 3856K select 0 0:00 0.00% postgres 586 msf 1 76 0 52140K 13912K select 0 0:00 0.00% python 2641 root 1 4 0 29388K 2876K sbwait 1 0:00 0.00% sshd 2644 msf 1 76 0 29364K 2904K select 1 0:00 0.00% sshd 578 msf 1 76 0 29224K 4140K select 0 0:02 0.00% postgres 576 msf 1 76 0 29216K 4048K select 0 0:00 0.00% postgres 583 msf 1 76 0 20488K 3940K select 0 0:00 0.00% postgres 589 msf 1 76 0 20488K 3808K select 0 0:00 0.00% postgres 579 msf 1 76 0 20484K 3896K select 0 0:00 0.00% postgres 580 msf 1 81 0 19548K 3960K select 1 0:00 0.00% postgres 584 msf 1 76 0 19536K 3936K select 1 0:00 0.00% postgres 590 msf 1 76 0 19512K 3828K select 1 0:00 0.00% postgres Robert