From owner-freebsd-questions Thu Jan 16 18: 8:45 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 B62C137B401 for ; Thu, 16 Jan 2003 18:08:43 -0800 (PST) Received: from hotmail.com (f74.sea2.hotmail.com [207.68.165.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B66343F13 for ; Thu, 16 Jan 2003 18:08:43 -0800 (PST) (envelope-from frank19991@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 16 Jan 2003 18:08:43 -0800 Received: from 128.2.128.65 by sea2fd.sea2.hotmail.msn.com with HTTP; Fri, 17 Jan 2003 02:08:42 GMT X-Originating-IP: [128.2.128.65] From: "Frank Li" To: d.anker@au.darkbluesea.com Cc: neuhauser@bellavista.cz, cswiger@mac.com, freebsd-questions@freebsd.org Subject: Re: Increase memory limit ? Date: Thu, 16 Jan 2003 20:08:42 -0600 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 17 Jan 2003 02:08:43.0114 (UTC) FILETIME=[5C1CECA0:01C2BDCD] 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 Thanks for all of your replies, Now I can do it through recompiling the kernel and the limits did increase. I haven't tried whether it can increase over 2G (I would love that if it can!). The code I used cannot be easily changed to reduce memory consumption but I think 2G would probably be enough for some time. Indeed, I found the max value I could set is 2048*1024*1024-1, bigger than that will result in a negative value shown by "limit". >You can also tune this at boot time by adding them to the file >/boot/loader.conf. e.g. > >kern.maxdsiz="(256*1024*1024)" I added this (though it was actually 1024*1024*1024) to /boot/loader.conf and also /boot/defaults/loader.conf, and booted the GENERIC kernel. The limits were still the old ones (i.e.512M). It did not work I don't know why, but I am already happy as recompiling kernel worked anyway. The final problem now becomes: Initially I made the swap partition to be 1GB and there is no more free partition on my harddisk. This value now actually becomes the bottleneck. Repartitioning will lose all my data and also applications installed, and thus is very high cost operation. Is there any easy way to increase the swap partition ? Say, add one more harddisk(need to tell the OS?)? For me, the easiest way I prefer is to use a file (under /usr say, as I have lots of space there) associated with a disk device by vnconfig for the swapping. It seems not difficult to do so. By looking at /etc/rc, I noticed the following: # Add additional swapfile, if configured. # case ${swapfile} in [Nn][Oo] | '') ;; *) if [ -w "${swapfile}" -a -c /dev/vn0b ]; then echo "Adding ${swapfile} as additional swap" vnconfig -e /dev/vn0b ${swapfile} swap fi ;; esac The swapfile will be associated as an additional swap device (i.e./dev/vn0b which does exist in my system). But I didn't find where the variable ${swapfile} is set. Do you know ? I tried adding one line "swapfile=/usr/someone/swap1" and created a file /usr/someone/swap1 with vi editor by typing some characters in. Then boot the system, I saw the booting message said: Adding /usr/someone/swap1 as additional swap vnconfig: swapon : Device not configured: Doing intial network setup I am not sure if it actually already worked or not. Thanks! Frank _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message