Original posted Address: http://blog.csdn.net/%ef%bd%84%ef%bd%8c%ef%bd%98%ef%bd%95/archive/2007/06/13/1650097.aspx
Add swap space to Linux
In the installation of Linux, do not know how much swap space allocation is better, so will randomly assign a, in real use, such as installation oracle10g will require a lot of swap space, found that swap space is not enough, that should be how to increase the size of swap space.
The following operations are done under root, first by establishing a partition, using the DD command such as DD if =/Dev/zero of =/home/swap bs = 1024 count = 512000
This creates a partition file such as/home/swap. The size of the file is 512,000 blocks, typically 1 blocks to 1 K, so the space here is 512M. Then turn this partition into a swap partition. /Sbin/mkswap/home/swap
And then use this swap partition. Make it a valid state. /Sbin/swapon/home/swap
Now look at the memory and swap size with the FREE-M command, and you'll see an increase in 512M of space. However, when the computer restarts, the discovery of swap is still the same size, the new swap does not start automatically, but also manually start. Then we need to modify the/etc/fstab file, add the following line/Home/swap swap defaults 0 0 and you'll find that your machine starts automatically. The swap space is also enlarged later.
trackback:http://tb.blog.csdn.net/trackback.aspx?postid=1650097