AboutWelcome to Free Software Daily (FSD). FSD is a hub for news and articles by and for the free and open source community. FSD is a community driven site where members of the community submit and vote for the stories that they think are important and interesting to them. Click the "About" link to read more...
Most modern operating systems are capable of using a file or partition known as a swap or paging file. Most Linux distributions will also install one for you by default. This file is used to extend the amount of available RAM by writing some of it to your hard drive.
There's just one problem: hard drives are slow. We can't fix that problem yet, but we can avoid it...
This tutorial will help you set up both the /boot partition and the SWAP space you need on your Debian 5 Lenny install. Please refer to the tutorial on LVM if you want to use Logical Volume Management for your install.
You you have alloted a low space while installing, or you have upgraded your RAM, or you think you need some more swap space then what will you do. You can go to the partion table make make changes, but this can cause many problems.
Instead you can just make a file and assign it to the swap.
"When a GNU/Linux machine runs out of physical memory it will start to use any configured swap-space. This is usually a sign of trouble as swap files and partitions are significantly slower to access than physical memory, however having some swap is generally better than having none at all.
Linux and other Unix-like operating systems use the term "swap" to describe both the act of moving memory pages between RAM and disk, and the region of a disk the pages are stored on. It is common to use a whole partition of a hard disk for swapping.
It has been almost two years since LWN covered the swap prefetch patch. This work, done by Con Kolivas, is based on the idea that if a system is idle, and it has pushed user data out to swap, perhaps it should spend a little time speculatively fetching that swapped data back into any free memory that might be sitting around.
Many times we face a situation when our Ubuntu Netbook becomes pretty slow. And when we check out our RAM, we find that only half of our RAM is used and the SWAP memory usage is gone upto 25% or 50% or even more. Confused??
If a system is idle, but has a lot of application data sitting around in swap, maybe it should page some of it back in. That way, the kernel won't spend too much time paging when the applications need to run again.
My particular Ubuntu 10.04 LTS installation is not suffering from the Xorg memory leak. So what's my increased use of swap all about? I don't know if it's beneficial or not to have so much swapping going on, but a couple of readers have told me that Ubuntu's "swappiness" is set to a level of 60, which is optimal for servers.