From owner-freebsd-stable@FreeBSD.ORG Thu Mar 22 23:31:57 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FBAE16A407 for ; Thu, 22 Mar 2007 23:31:57 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 54CC213C45D for ; Thu, 22 Mar 2007 23:31:57 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay7.apple.com (a17-128-113-37.apple.com [17.128.113.37]) by mail-out4.apple.com (8.13.8/8.13.8) with ESMTP id l2MNVvna012905; Thu, 22 Mar 2007 16:31:57 -0700 (PDT) Received: from relay7.apple.com (unknown [127.0.0.1]) by relay7.apple.com (Symantec Mail Security) with ESMTP id 141C530076; Thu, 22 Mar 2007 16:31:57 -0700 (PDT) X-AuditID: 11807125-b0e66bb00000538d-ed-460311ec2781 Received: from [17.214.13.96] (cswiger1.apple.com [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay7.apple.com (Apple SCV relay) with ESMTP id F0E4E30030; Thu, 22 Mar 2007 16:31:56 -0700 (PDT) In-Reply-To: <1dbad3150703221617g488c3e96t20e552fc41c265a5@mail.gmail.com> References: <1dbad3150703221504u71e3db44sbefeed758ed253db@mail.gmail.com> <20070322230314.257D445047@ptavv.es.net> <1dbad3150703221617g488c3e96t20e552fc41c265a5@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9363AFA5-0DEF-428A-A6D4-E04A4A414F0B@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Thu, 22 Mar 2007 16:31:55 -0700 To: Michael Schuh X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: FreeBSD Stable Subject: Re: another error with md malloc based fs 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: Thu, 22 Mar 2007 23:31:57 -0000 On Mar 22, 2007, at 4:17 PM, Michael Schuh wrote: > i can't understand how malloc can eat all available > memory, i have 2Gigs of it ;-) > so it seems to me i know what i doing, if > i have 1,6 Gigs free Memory, and i say ok get me 750Megs from > my 1,6 Gigs of free Memory, what was faulty on that???? The two choices involve a swap-based RAMdisk, which can use all of the available physical RAM it needs to, since this memory is swappable, or a kernel-memory-based RAMdisk, which uses wired-down memory from within the kernel. You shouldn't or can't create huge kernel-based RAMdisks without expanding the amount of KVM available to the kernel...it's not reasonable to wire down hundreds of MB or RAM in almost all situations. > i hope it gave another way to use such ram-disk without using > swap or other harddisk based backend....otoh my ram is not fully > useful > for me and i must, after twelve years of using freebsd, looking > back to > linux, and that i never would, only for using ramdisks.... If you wanted to create a 10MB RAMdisk, using kernel-based memory would be fine. For things which are much larger than that, the kernel's global VM management is using techniques like page-fault frequency heuristics and will do a better job of keeping active stuff cached in RAM (regardless of whether the stuff is part of a running process or part of your RAMdisk filesystem), if you let the kernel manage the situation than if you try to configure hundreds of MB which can only be used for a RAMdisk. Anyway, if you want to use Linux instead, nobody here is going to try to persuade you to do otherwise. Have fun, -- -Chuck