[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Circumventing memory leaks via swap space
From: |
Steve Railsback |
Subject: |
Re: [Swarm-Support] Circumventing memory leaks via swap space |
Date: |
Fri, 28 Nov 2008 10:21:15 -0800 |
User-agent: |
Thunderbird 2.0.0.18 (X11/20081119) |
Marcus G. Daniels wrote:
Steve Railsback wrote:
I got around the problem simply by creating a new giant swap partition
on my Linux hard drive.
To do that on Linux:
1. Make a large file with "dd if=/dev/zero of=swapfile bs=1024
count=BIGNUMBER". Where BIGNUMBER is the number of kilobytes in your
swapfile.
2) Set it up as a swapfile with "mkswap swapfile".
3) Bring it online "swapon swapfile".
This is cool! I did it on my dual-boot laptop where I don't have the
space (or the courage) to make a new swap partition. Here's exactly what
I did in Fedora 9:
1. In my home directory:
dd if=/dev/zero of=MyGiantSwapfile bs=1024 count=6000000
That created a 6 gigabyte empty file called MyGiantSwapfile.
2. Then:
/sbin/mkswap MyGiantSwapfile
(On my machine, the command "mkswap" is not on the path so I had to
include the path to it.)
3. Then:
su -c "/sbin/swapon MyGiantSwapfile"
(Again, the command "swapon" is not on the path.
As I understand, this last command has to be repeated to activate the
swap file, each time you log in. And you can de-activate it with "swapoff".)
Now you can verify that it worked by starting up the system monitor and
looking at the resources. You can see that there is a lot more swap space.
Steve
--
Steve Railsback
Lang, Railsback & Associates
Arcata, California
www.LangRailsback.com