Date: Mon, 12 Mar 2007 12:14:02 -0700 From: Chuck Swiger <cswiger@mac.com> To: Dima Sorkin <dima.sorkin@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: limitiation on memory allocation Message-ID: <8E7D8006-9480-4CF7-B670-1328BB881FCE@mac.com> In-Reply-To: <e40293600703121202xf00a13fxa4ecbda7e8020797@mail.gmail.com> References: <e40293600703090632v3f25742g16e75708ded632ee@mail.gmail.com> <6.0.0.22.2.20070309094909.024c9dd0@mail.computinginnovations.com> <e40293600703090906n6f648580p5d46f45455ee707b@mail.gmail.com> <6.0.0.22.2.20070309133935.024b8fd0@mail.computinginnovations.com> <e40293600703121120w7a013919l36103a19a930440a@mail.gmail.com> <E47B8943-BB90-4E12-9CFD-278952B6B73F@mac.com> <e40293600703121202xf00a13fxa4ecbda7e8020797@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 12, 2007, at 12:02 PM, Dima Sorkin wrote: > Something is probably wrong. > kern.dfldsiz on my machine does not influence. I don't believe you can change that value after the system has booted-- you have to set it either in the kernel's config file, or in /boot/loader.conf, for this to actually take effect. > I.e. after booting I run > $ limits > and it shows me the old 500M. > > Now, a point about 'maxdsiz'= 3.0-3.5G instead of 4G - this one I > must check. > I tried 3.9G :) Try using 3GB, agreed. Also, please note that the dftdsiz keyword affects the "hard" limit, not the "soft" limit...your shell might well have 500MB "soft" dsize limit by default, but would permit you to change that upward to the maximum set by the "hard" limit once you've changed that value. See "man getrlimit": A resource limit is specified as a soft limit and a hard limit. When a soft limit is exceeded a process may receive a signal (for example, if the cpu time or file size is exceeded), but it will be allowed to con- tinue execution until it reaches the hard limit (or modifies its resource limit). The rlimit structure is used to specify the hard and soft limits on a resource, struct rlimit { rlim_t rlim_cur; /* current (soft) limit */ rlim_t rlim_max; /* maximum value for rlim_cur */ }; Only the super-user may raise the maximum limits. Other users may only alter rlim_cur within the range from 0 to rlim_max or (irreversibly) lower rlim_max. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8E7D8006-9480-4CF7-B670-1328BB881FCE>