From owner-freebsd-current Mon Apr 22 13:19:44 2002 Delivered-To: freebsd-current@freebsd.org Received: from soulshock.mail.pas.earthlink.net (soulshock.mail.pas.earthlink.net [207.217.120.130]) by hub.freebsd.org (Postfix) with ESMTP id 179D837B417; Mon, 22 Apr 2002 13:19:34 -0700 (PDT) Received: from swan.prod.itd.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by soulshock.mail.pas.earthlink.net (8.11.6+Sun/8.11.6) with ESMTP id g3MDALw29705; Mon, 22 Apr 2002 06:10:21 -0700 (PDT) Received: from pool0081.cvx40-bradley.dialup.earthlink.net ([216.244.42.81] helo=mindspring.com) by swan.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 16zdVM-0007X6-00; Mon, 22 Apr 2002 06:05:16 -0700 Message-ID: <3CC40A62.B40E816F@mindspring.com> Date: Mon, 22 Apr 2002 06:04:34 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Marc G. Fournier" Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: Re: FreeBSD 4.5-STABLE not easily scalable to large servers ... ? References: <20020422091602.O1721-100000@mail1.hub.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Marc G. Fournier" wrote: > > You aren't going to be able to exceed 4G, no matter what you do, > > because that's the limit of your address space. > > > > If you want more, then you need to use a 64 bit processor (or use a > > processor that supports bank selection, and hack up FreeBSD to do > > bank swapping on 2G at a time, just like Linux has been hacked up, > > and expect that it won't be very useful). > > Now I'm confused ... from what I've read so far, going out and buying an > IBM eSeries 350 with 16Gig of RAM with Dual-PIII processors and hoping to > run FreeBSD on it is not possible? Or, rather, hoping to use more then > 4 out of 16Gig of RAM is? FreeBSD doesn't currently support bank selection. Peter was working on it, last time I heard. Linux supports it, at an incredible performance penalty. But yes, it means only 4G of the RAM will be usable by you. Bank selection works by leaving the address space at 4G, and switching between banks, 2G at a time out of the 16G. Basically, your kernel code lives in the first 2G, and then you get to pick which 2G out of the 16G is the last 2G. As I said, I expect that doing this won't be very useful; since Itanium's are available, and FreeBSD runs native in multiuser mode on IA64 now, there's really no reason to do the 16G, 2G at a time bank selection trick. The main reason I don't think it'll be useful is "DMA": for the DMA to occur, it will have to occur into the first 2G, so that it's never selected out. This is because, no matter what you do, your address space is limited to 4G total: adding banks just controls what physical memory is placed in that 4G window at any given time. Since the most useful thing you could do with more memory is buffers for networking and disk I/O for things like web and file servers... not very useful. Consider that if I had two processes, and divided the memory into 8 2G banks. The 0th bank has the kernel in it, and can never be selected out, if you expect the kernel to run or DMA to be possible. The 1th bank contains the memory for one process, running on CPU 0. The 4th bank contains the memory for one process, running on CPU 1. Basically, now, you can not run these processes simultaneously, because they have conflicting bank selects. You could jam everything into all the code -- you'd have to hack the paged memory management, the VM, the scheduler, etc., to get it to work -- but, even so, after all that work, what you have effectively bought yourself is an "L3 cache" that's in RAM, rather than in a swap partition. You are better off just making it usable as swap, semi-directly, and then making all the paging structures not used for the kernel itself, swappable. Even so, your KVA is restricted by whatever your bank size is, and you can't use it directly (e.g. KVA + UVA + bank_region <= 4G). You really, really ought to look at the books I recommended, if you are confused about why you can only use 4G with a 32 bit processor and FreeBSD, without additional heroic work. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message