From owner-freebsd-stable@FreeBSD.ORG Wed Jan 26 13:20:52 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACD21065672 for ; Wed, 26 Jan 2011 13:20:52 +0000 (UTC) (envelope-from bartosz.stec@it4pro.pl) Received: from mainframe.kkip.pl (kkip.pl [87.105.164.78]) by mx1.freebsd.org (Postfix) with ESMTP id 984F68FC18 for ; Wed, 26 Jan 2011 13:20:51 +0000 (UTC) Received: from static-78-8-144-74.ssp.dialog.net.pl ([78.8.144.74] helo=[192.168.0.2]) by mainframe.kkip.pl with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1Pi5Ig-00076O-KB; Wed, 26 Jan 2011 14:20:50 +0100 Message-ID: <4D401F9C.6050402@it4pro.pl> Date: Wed, 26 Jan 2011 14:20:28 +0100 From: Bartosz Stec Organization: IT4Pro User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <4D401192.3030400@it4pro.pl> <201101260806.10084.jhb@freebsd.org> In-Reply-To: <201101260806.10084.jhb@freebsd.org> X-Authenticated-User: bartosz.stec@it4pro.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -8.1 X-Spam-Score-Int: -80 X-Exim-Version: 4.73 (build at 10-Jan-2011 16:29:01) X-Date: 2011-01-26 14:20:50 X-Connected-IP: 78.8.144.74:51423 X-Message-Linecount: 153 X-Body-Linecount: 139 X-Message-Size: 5080 X-Body-Size: 4456 X-Received-Count: 1 X-Recipient-Count: 2 X-Local-Recipient-Count: 2 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Stable Subject: Re: top shows only half of realmem? 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: Wed, 26 Jan 2011 13:20:52 -0000 W dniu 2011-01-26 14:06, John Baldwin pisze: > On Wednesday, January 26, 2011 7:20:34 am Bartosz Stec wrote: >> Guys, >> >> could someone explain me this? >> >> # sysctl hw.realmem >> hw.realmem: 2139029504 >> >> top line shows: >> >> Mem: 32M Active, 35M Inact, 899M Wired, 8392K Cache, 199M Buf, 58M Free >> >> 32+35+899+8+199+58 = 1231MB >> >> Shouldn't that sum to all available ram? Or maybe I'm reading it wrong? >> This machine has indeed 2GB of ram on board and showed in BIOS. >> i386 FreeBSD 8.2-PRERELEASE #16: Mon Jan 17 22:28:53 CET 2011 >> Cheers. > First, don't include 'buf' as isn't a separate set of RAM, it is only a range > of the virtual address space in the kernel. It used to be relevant when the > buffer cache was separate from the VM page cache, but now it is mostly > irrelevant (arguably it should just be dropped from top output). Thanks for the explanation. So 1231MB - 199MB Buf and we got about 1GB of memory instead of 2B. > However, look at what hw.physmem says (and the realmem and availmem lines in > dmesg). realmem is actually not that useful as it is not a count of the > amount of memory, but the address of the highest memory page available. There > can be less memory available than that due to "holes" in the address space for > PCI memory BARs, etc. > OK, here you go: # sysctl hw | grep mem hw.physmem: 2125893632 hw.usermem: 1212100608 hw.realmem: 2139029504 hw.pci.host_mem_start: 2147483648 And here's the part of /boot/loader.conf for ZFS tuning which may (or probably may not) connected to this issue: vm.kmem_size="1536M" vm.kmem_size_max="1536M" vfs.zfs.arc_max="1280M" -- Bartosz Stec