Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2003 20:08:42 -0600
From:      "Frank Li" <frank19991@hotmail.com>
To:        d.anker@au.darkbluesea.com
Cc:        neuhauser@bellavista.cz, cswiger@mac.com, freebsd-questions@freebsd.org
Subject:   Re: Increase memory limit ?
Message-ID:  <F74BJjvmZp0mmhQZiCT0000070b@hotmail.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F74BJjvmZp0mmhQZiCT0000070b>