From owner-freebsd-questions Wed Jan 15 18:13:25 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 857B437B405 for ; Wed, 15 Jan 2003 18:13:22 -0800 (PST) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F0CE43F3F for ; Wed, 15 Jan 2003 18:13:21 -0800 (PST) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 8D10F51955; Thu, 16 Jan 2003 12:43:18 +1030 (CST) Date: Thu, 16 Jan 2003 12:43:18 +1030 From: Greg 'groggy' Lehey To: Frank Li Cc: freebsd-questions@freebsd.org Subject: Re: Increase memory limit ? Message-ID: <20030116021318.GM17072@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday, 15 January 2003 at 18:36:31 -0600, Frank Li wrote: > The situation is as follows: > > Physical memory is 128M, OS is FreeBSD 4.4. > My C++ simulation code mallocs large amount of memory. When running, I > found "top" shows SIZE is 514M, RES is 176M. That's rather difficult on a machine with only 128 MB. > Then the code dumpped a core. The code itself should have no > problem. It's not complicated and it runs very well when running > shorter. > > Top shows: > Mem: 180M Active, 21M Inact, 32M Wired, 13M Cache, 35M Buf, 656K Free This shows that you have much more than 128 MB of memory in the machine. And how much swap? > Abort trap - core dumped > . PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 66351 dxu -22 0 514M 127M swread 0:11 36.96% 27.39% simulation > > limit shows: > cputime unlimited > filesize unlimited > datasize 524288 kbytes > stacksize 65536 kbytes > coredumpsize unlimited > memoryuse unlimited > descriptors 1064 > memorylocked unlimited > maxproc 531 > > I tried to increase the above limits but failed. They seem to be already > the maximum. No, you need to set them in /etc/login.conf. > Should I add more physical memory That might speed things up, but it shouldn't make any other difference. > (if so should I reinstll OS)? NO! You don't reinstall the system, ever. Well, almost never. Just reboot. > Can I just set some parameters(what?) and recompile kernel and > increase these limits ? No. Just reboot. The real issue is why your simulation is dying. Do you have any messages in /var/log/messages indicating that you're out of swap? Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message