Date: Mon, 01 Apr 96 19:13:01 PST From: dec@lazarus.nrtc.northrop.com To: Terry Lambert <terry@lambert.org> Cc: freebsd-questions@freebsd.org Subject: Re: HRecofiguring to greater than 16Mbyte Text Segments Message-ID: <9604020313.AA26022@lazarus.nrtc.northrop.com> In-Reply-To: Your message of "Mon, 01 Apr 96 17:51:11 PST." <199604020051.RAA14857@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199604020051.RAA14857@phaeton.artisoft.com> you write: >> >> Hi Folks, >> >> What's the magic to reconfigure FreeBSD 2.1 to support larger than >> 16Mbyte Text Segments? > >stty erase Yeah...sorry about that one, haven't gotten things fully cleaned up yet - argh. >Just joking... Hey - it is April 1, right? >I assume you mean data size or something? We don't have user space >visible segments, we're a real OS... 8-). size says: text data bss dec hex 17817600 3833856 6736792 28388248 1b12b98 i.e., text is just over 16M - if text is under 16M, all is well! >Use the "limit" or "ulimit" command (it depends on your shell). limit says: cputime unlimited filesize unlimited datasize 131072 kbytes stacksize 65536 kbytes coredumpsize unlimited memoryuse unlimited descriptors 64 memorylocked 20826 kbytes maxproc 40 Now, the reason I say MAGIC is because /sys/i386/include/vmparam.h tells us: /* * Machine dependent constants for 386. */ /* * Virtual memory related constants, all in bytes */ #define MAXTSIZ (16UL*1024*1024) /* max text size */ ^^^^^^^^^^^^^^^^ 16Mbytes!!!! #ifndef DFLDSIZ #define DFLDSIZ (64UL*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ #define MAXDSIZ (128UL*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (8UL*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ #define MAXSSIZ (64UL*1024*1024) /* max stack size */ #endif #ifndef SGROWSIZ #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif Now, I can double MAXTSIZ and my application will run just fine, but it screws up something with the swap system and the filesystem will be thrashed. As memory serves, the fix is to also adjust DMMIN and DMMAX, but do I simply double, or what? And what about DMTEXT? i.e., again from vmparam.h: /* * Default sizes of swap allocation chunks (see dmap.h). * The actual values may be changed in vminit() based on MAXDSIZ. * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024. */ #define DMMIN 32 /* smallest swap allocation */ #define DMMAX 4096 /* largest potential swap allocation */ #define DMTEXT 1024 /* swap allocation for text */ Suggestions? /dec
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9604020313.AA26022>