Saturday, November 19, 2005

Templete Georgia Driver's Licence

Linux swap - swap programs although still enough memory is available?


preface


This does not always help, especially for complex applications such as databases (DB2) there are processes that are outsourced to the "swap" although it has turned many screws. For the normal home user, especially if one has a slightly aged computer these settings is a useful tool. At least it does me so often when I program or the book, rummage that programs be stored in the swap, although I have (in my opinion) but still use it.


Swap (files) following: --- snip --- linux: ~ # swapon-s Filename Type Size Used
Priority
/ partition dev/hda11 522 072 0 -1
--- snap ---

example, you can also have a swap partition to a file (in this case about 200MB) create:

The file it can create as follows: dd if =
/ dev / zero of = / swapfile bs = 4096 count = 50000

With "mkswap / swapfile" They krichten in the file as swap space.

Last but you can use "swapon / swapfile" to activate the swap file. This all after a reboot again because you have this in / etc / fstab add :
--- --- snip
/ dev/hda11 swap swap priority = 60, defaults 0 0
--- snap ---
As you know now set the Swapverhalten between multiple swap space you now. To set the general Swapverhalten you see here:

in "/ Proc / sys / vm / swappiness" You can store the percentage value to be swapped as strong. The default is usually "60". Private
to set this value dear to "10" - quasi swap only if the memory is quite short.

The value can be modified as follows:
echo-n "10"> / proc / sys / vm / swappiness


0 comments:

Post a Comment