Large memory issues on 4-STABLE
Wes Peters
wes at softweyr.com
Mon Sep 15 18:15:09 PDT 2003
On Sunday 14 September 2003 22:07, Irvine Short wrote:
>
> However we have a situation where if I set MAXDSIZ to 2048 or above
> then things break, so FreeBSD right now has an effectivce limit of
> 2GB per process.
>
> Is this to be considered a bug or a feature?
Neither. Tuning MAXDSIZ is not for the faint of heart. I assume you
have searched the mailing list archives and discovered the few gems of
messages that explain precisely how you can set MAXDSIZ to roughly 3GB?
I did this last summer, using 4.7-ish sources, with success, but it
took a couple of days of tinkering and testing to get a configuration
that worked, and it wasn't exactly 3072MB, it was more like 2940MB or
so.
> Then, with the PAE support, lets say I have 8GB of RAM. Will those
> same design limitations restrict me to 3GB of RAM, or 2GB, or will I
> be able to have a single process addressing 4GB all by itself?
The kernel still has to be mapped into the process address space, so
you'll get the same number you got before. The difference PAE makes is
that you can have more such processes resident in memory than without.
> This is relevant to the work we're doing - some of my users actually
> really do need this amount of memory.
As did mine.
Let's see, here's one hint, found in
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=83003+0+archive/2002/freebsd-hackers/20020804.freebsd-hackers
:I'm running into some similar issues when trying to make Squid eat as
:much as possible of the 4 GB memory I have installed in a Compaq
:ProLiant DL 380 G2. At first, Squid seems to die and restart when
trying
:to allocate memory above 512 MB. By tuning MAXDSIZ, I have made it use
:up to around 2 GB. If I set MAXDSIZ (I now do it in loader.conf with
:kern.maxdsiz) above around 2950 MB, init starts failing upon boot:
:
:init in malloc(): error mmap(2) failed, check limits
:init in malloc(): warning: recursive call
That's pretty close to my recollection of 2940MB. A "quick" binary
search, using the loader to specify MAXDSIZ, will probably nail down
just how big you can get and still remain stable. Remember to set
resource limits for your users so they can actually take advantage of
this once you've found out what the limit is.
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters wes at softweyr.com
More information about the freebsd-stable
mailing list