Using a swapfile to increase the swap space on your system



This can be a very handy function if we want to use a file, instead of a partition, and with modern filesystems the performance is almost on par with using a dedicated partition for your swap area.


1. Using dd lets make a zero’d file for the swap

dd if=/dev/zero of=/swapfile bs=1048576 count=1000
This example would create a swapfile of 1 gig using a blocksize of a megabyte (1048576).


2. Make file as a swapfile

mkswp /swapfile
3. Activate swapfile

swapon /swapfile
4. Verify that our swapfile has been activated

swapon -s
We should see something like this in the list ..
Filename Type Size Used Priority
/swapfile file 9999992 0 -2
If you want to have this a permanent solution, then adding the entry to fstab would probally be a better idea,
open up /etc/fstab in your favourite editor and add the following line.
/swapfile swap swap defaults 0 0


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

2 comments:

madin said...

No name in the best aaa rolex watches uk watch world approaches the stature of Rolex. fake rolex gmt master ii Literally a synonym for quality and a household name that transcends the watch industry, Rolex is both an impeccable manufacture of segment-leading products and an article of international pop culture.

madin said...

replica men Louboutin shoes
replica men ankle boots
replica men boat shoes
replica men Louboutin derby
replica men Louboutin espadrilles
replica men Louboutin loafers
replica men Louboutin oxfords
replica men Louboutin sneakers
replica women Louboutin
replica women Louboutin boots

Post a Comment

Popular Posts