Subject: How much RAM is too much? From: Chris Cameron To: misc@openbsd.org It has been written a couple of times on this mailing list that due to the way OpenBSD deals with memory, it'd be wise only to have as much RAM in your computer as is needed. This is due to overhead in how the kernel manages things (at least this is my understanding; hard topic to search for). My problem is, I'm running various server processes that have the ability to use as much or little RAM as cache as they're allowed (Postgres, MySQL, IonCube, disk cache etc). So, it seems to make sense to put in the 4 gig max, and then use it all as cache for various things. However I'm unclear as to how the above problem would come into play here. While I'm not sure how the servers I listed would benefit from more cache, I know MySQL definitely could use more cache, but as it is I'm borderline swapping with my 512Megs (not because of MySQL but because of other applications). So, I guess the question is, what will I see happen if I put in 2 to 4 gigs of RAM? Any help would be appreciated. Chris -- Chris Cameron UpNIX Internet Administrator ardvark.upnix.net bitbucket.upnix.net -- http://www.upnix.com From: Andy Isaacson To: Chris Cameron Cc: misc@openbsd.org Subject: Re: How much RAM is too much? On Wed, Nov 05, 2003 at 12:40:25PM -0700, Chris Cameron wrote: > It has been written a couple of times on this mailing list that due to > the way OpenBSD deals with memory, it'd be wise only to have as much RAM > in your computer as is needed. This is due to overhead in how the kernel > manages things (at least this is my understanding; hard topic to search > for). [snip] I'm not an expert, but my general understanding is that more than 1GB physical RAM requires special handling on x86, and OpenBSD is pretty unlikely to be tuned for such situations. Linux, for example, requires a kernel compiled with special options (HIGHMEM) to use more than 960 MB of RAM. (Dunno if I have the number exactly right, it's 1024-2^x for some value of x.) Close enough to 1GB that most people just let the extra go to waste. > While I'm not sure how the servers I listed would benefit from more > cache, I know MySQL definitely could use more cache, but as it is I'm > borderline swapping with my 512Megs (not because of MySQL but because of > other applications). > > So, I guess the question is, what will I see happen if I put in 2 to 4 > gigs of RAM? You might get away with 2GB, but 4GB will definitely make OpenBSD unhappy, according to the stories I've seen on the list. I would recommend that you test 1GB and 2GB, and be prepared to be limited to 1GB. This is an excellent opportunity for you to contribute, BTW. Few on this list have the hardware to try 2GB or 4GB, so you can try it and report your findings. -andy Date: Thu, 6 Nov 2003 11:40:07 +0100 From: Henning Brauer To: misc@openbsd.org Subject: Re: How much RAM is too much? On Wed, Nov 05, 2003 at 09:50:18PM -0600, Andy Isaacson wrote: > On Wed, Nov 05, 2003 at 12:40:25PM -0700, Chris Cameron wrote: > > It has been written a couple of times on this mailing list that due to > > the way OpenBSD deals with memory, it'd be wise only to have as much RAM > > in your computer as is needed. This is due to overhead in how the kernel > > manages things (at least this is my understanding; hard topic to search > > for). > [snip] > I'm not an expert, but my general understanding is that more than 1GB > physical RAM requires special handling on x86, and OpenBSD is pretty > unlikely to be tuned for such situations. no, that's not true. I ran a machine with 1.5 GB at 2.9 days. perhaps I still do, I forgot which one it was ;-) there may be problems with more than 2 GB - it basically works, but then something may not work correctly ;-) this would be worth checking and reporting. -- http://2suck.net/hhwl.html - http://www.bsws.de/ Unix is very simple, but it takes a genius to understand the simplicity. (Dennis Ritchie) From: Marco Peereboom To: misc@openbsd.org Subject: Re: How much RAM is too much? Date: Thu, 6 Nov 2003 07:30:39 -0600 I run a whole boatload of boxes with 2G (just becaue I can). My home devbox: root@devbox root]# dmesg OpenBSD 3.4-current (GENERIC) #1: Tue Sep 23 07:34:10 CDT 2003 root@devbox.peereboom.us:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium III (Tualatin) ("GenuineIntel" 686-class) 1.40 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SIMD real mem = 2147069952 (2096748K) avail mem = 1987391488 (1940812K) using 4278 buffers containing 107454464 bytes (104936K) of memory I have had some misc problems when running with 4GBs (nothing serious). Don't recall what it was though. I scaled all my boxes down to 2 after that incident. On Thursday 06 November 2003 04:40 am, Henning Brauer wrote: > On Wed, Nov 05, 2003 at 09:50:18PM -0600, Andy Isaacson wrote: > > On Wed, Nov 05, 2003 at 12:40:25PM -0700, Chris Cameron wrote: > > > It has been written a couple of times on this mailing list that due to > > > the way OpenBSD deals with memory, it'd be wise only to have as much > > > RAM in your computer as is needed. This is due to overhead in how the > > > kernel manages things (at least this is my understanding; hard topic to > > > search for). > > > > [snip] > > I'm not an expert, but my general understanding is that more than 1GB > > physical RAM requires special handling on x86, and OpenBSD is pretty > > unlikely to be tuned for such situations. > > no, that's not true. I ran a machine with 1.5 GB at 2.9 days. > perhaps I still do, I forgot which one it was ;-) > > there may be problems with more than 2 GB - it basically works, but > then something may not work correctly ;-) > this would be worth checking and reporting. To: Andy Isaacson Cc: misc@openbsd.org Subject: Re: How much RAM is too much? Date: Thu, 06 Nov 2003 14:21:32 -0700 From: Tobias Weingartner On Wednesday, November 5, Andy Isaacson wrote: > > You might get away with 2GB, but 4GB will definitely make OpenBSD > unhappy, according to the stories I've seen on the list. I would > recommend that you test 1GB and 2GB, and be prepared to be limited to > 1GB. I believe 4GB ram does work. I know that I fixed at least 2 bugs myself, and art fixed at least 2 more to make this work. How well the ram is used is another matter... --Toby. To: misc@openbsd.org From: naddy@mips.inka.de (Christian Weisgerber) Subject: Re: How much RAM is too much? Date: Thu, 6 Nov 2003 23:10:28 +0000 (UTC) Andy Isaacson wrote: > You might get away with 2GB, but 4GB will definitely make OpenBSD > unhappy, according to the stories I've seen on the list. I would > recommend that you test 1GB and 2GB, and be prepared to be limited to > 1GB. The previous incarnation of i386.ports as well as my own i386 box have 2GB. This works just fine. 4GB warrants a re-examination. -- Christian "naddy" Weisgerber naddy@mips.inka.de Date: Fri, 7 Nov 2003 09:27:09 -0800 From: Scott Francis To: Andy Isaacson Cc: Chris Cameron , misc@openbsd.org Subject: Re: How much RAM is too much? On Wed, Nov 05, 2003 at 09:50:18PM -0600, adi@hexapodia.org said: [snip] > Linux, for example, requires a kernel compiled with special options > (HIGHMEM) to use more than 960 MB of RAM. (Dunno if I have the number > exactly right, it's 1024-2^x for some value of x.) Close enough to 1GB > that most people just let the extra go to waste. It's 4GB or 64GB support in Linux. Default is 4GB support; highmem kernels support up to 64GB with the PAE extensions. -- Scott Francis || darkuncle (at) darkuncle (dot) net illum oportet crescere me autem minui Date: Fri, 07 Nov 2003 15:23:13 -0500 From: Adam Skutt To: Scott Francis Cc: misc@openbsd.org Subject: Re: How much RAM is too much? Scott Francis wrote: > It's 4GB or 64GB support in Linux. Default is 4GB support; highmem kernels > support up to 64GB with the PAE extensions. > -- FWIW, getting to run with anything more than 16GB won't happen, as mem_map[] will simply be too big. I don't think there are any plans to fix this either, since it would really require a VM-rewrite. -- Adam