From owner-freebsd-questions@FreeBSD.ORG Sun May 9 21:40:29 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FC691065670 for ; Sun, 9 May 2010 21:40:29 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id B8C338FC15 for ; Sun, 9 May 2010 21:40:28 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OBEEe-0008Kv-5w for freebsd-questions@freebsd.org; Sun, 09 May 2010 14:40:28 -0700 Message-ID: <28505453.post@talk.nabble.com> Date: Sun, 9 May 2010 14:40:28 -0700 (PDT) From: Hubert Tournier To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: hubert@frbsd.org Subject: phys vs real vs user (avail) memory? 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: Sun, 09 May 2010 21:40:29 -0000 Hello, I was wondering about the memory indications displayed at boot time. For example: # dmesg| grep memory real memory = 51539607552 (49152 MB) avail memory = 49663688704 (47362 MB) The "real memory" is the size of the RAM modules in this computer (48 Gb). What's "avail memory"? The memory left after loading the kernel and its data structures? # sysctl -a | grep -i "hw.[a-z]*mem" hw.physmem: 51469168640 hw.usermem: 48338657280 hw.realmem: 53418655744 How come "physmem" be lower and "realmem" be higher than "real memory"? As an exercise, i've been unable to malloc more than 38 Gb of memory, despite having at least 43 Gb free at the time: # sysctl -a | egrep "vm.stats.vm.v_(free_count|inactive_count|cache_count|page_size)" vm.stats.vm.v_cache_count: 19 vm.stats.vm.v_inactive_count: 2113 vm.stats.vm.v_free_count: 11414720 vm.stats.vm.v_page_size: 4096 # sysctl kern.maxdsiz kern.maxdsiz: 51539607552 # mdconfig -a -t malloc -o reserve -s 38g md0 # mdconfig -d -u 0 # mdconfig -a -t malloc -o reserve -s 39g mdconfig: ioctl(/dev/mdctl): Cannot allocate memory Just for the sake of curiosity, any idea about why? Best regards, Hubert -- View this message in context: http://old.nabble.com/phys-vs-real-vs-user-%28avail%29-memory--tp28505453p28505453.html Sent from the freebsd-questions mailing list archive at Nabble.com.