Date: Mon, 22 Apr 2002 06:04:34 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: "Marc G. Fournier" <scrappy@hub.org> Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: Re: FreeBSD 4.5-STABLE not easily scalable to large servers ... ? Message-ID: <3CC40A62.B40E816F@mindspring.com> References: <20020422091602.O1721-100000@mail1.hub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"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-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CC40A62.B40E816F>