Tuesday, August 31, 2010

Increase SWAP memory whenever You need it...

You want to increase your allocated swap memory and you don't want to do it permanently by Re-Partition or Re-Installation. Don't Worry!!! Your solution is here:


Insure that you have sufficient free disk space. Now suppose you need to increase SWAP by, say, 500Mb. Open ur terminal switch to admin. (use su followed by admin password) and use the following commands


# dd if=/dev/zero if=/home/tempswap bs=1k count=500000
# cd /home
# chmod 600 tmpswap
# mkswap tempswap
# swapon tempswap



Approximately 500 mb of swap will be added. For checking use free as:
# free -m
To release swap goto your tmpswap folder(it will be in
/home) #cd /home
#swapoff tmpswap
now delete tempswap
#rm -f tmpswap
recheck your swap now
#free-m

No comments:

Post a Comment