From owner-freebsd-questions@FreeBSD.ORG Mon Aug 23 12:36:22 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7E731065674 for ; Mon, 23 Aug 2010 12:36:22 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 32EB78FC23 for ; Mon, 23 Aug 2010 12:36:22 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OnWGA-0007Ib-Rs for freebsd-questions@freebsd.org; Mon, 23 Aug 2010 14:36:18 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Aug 2010 14:36:18 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Aug 2010 14:36:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Mon, 23 Aug 2010 14:36:10 +0200 Lines: 49 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: X-Enigmail-Version: 1.0.1 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, 23 Aug 2010 12:36:22 -0000 On 08/23/10 11:50, n dhert wrote: > After a reboot of my FreeBSD 8.0-p4 system > a vmstat shows: > Mon Aug 23 08:40:00 CEST 2010 > procs memory page disks faults cpu > r b w avm fre flt re pi po fr sr da0 pa0 in sy cs us > sy id > 1 1 0 1515M 7118M 816 5 5 0 726 0 0 0 138 2376 1740 1 > 2 97 > My system had been allocated 8 Gb memory in a Vmware ESXi4 virtual machine. > avm = active virtual pages, fre = size of free list > 2525M + 7118M is 9600M is this normal? (more than 8 Gb..) See here, on a physical machine with 4 GB RAM: procs memory page disks faults cpu r b w avm fre flt re pi po fr sr ad0 cd0 in sy cs us sy id 1 0 0 5571M 1254M 30 0 0 0 29 0 0 0 8 519 522 0 0 100 We have 5571+1254=6825 MB. The catch is in the description - active *virtual* pages belonging to processes - they do not have to correspond to physical RAM. > six days ago is was: > 3 1 0 2446M 1552M 628 0 0 0 621 6 0 0 30 939 572 1 > 5 22 0 2260M 816M 489 0 0 0 478 2 0 0 27 957 580 > avm + free adds up to only 3 Gb. > Where is the rest of the memory ?? There are a lot other uses for memory. Try running "top" a couple of time when you seem to detect the leak and add together the various categories of memory. > Is there a memory leak, how to find what causes the memory leak? If indeed there is, which is not probable, you first need to discover is it in a userland program or in kernel. If in kernel, use "vmstat -m" to track usage over time and see if some category increases when it shouldn't. Also, since you are running vmware, maybe you should try running emulators/open-vm-tools and its vmmemctl driver - it could help if your host is running out of memory.