How to increase "swap" memory in Linux.
1) Create a new hard drive partition. I will use "/dev/sda" for this practical.
To verify your hard drive identity, use "fdisk -l"
2) Follow these steps.
- fdisk /dev/sda
Press "n" for new partition.
You'll get First Cylinder Name :- Press Enter
You'll get Last Cylinder Name :- type "+500M" (Adding 500MB as a swap space)
- Press "t" to assign "swap" id for a newly created partition. Here,redhat uses "82" as a swap id.
- Press "w" to write changes to disk & exit.
3) Use "partprobe" command
4) mkfs.ext3 /dev/sda6 Making File System on a newly created partition,i.e. /dev/sda6
5) mkswap /dev/sda6 Make this partition as a "swap"
6) swapon /dev/sda6 Enable "swap" partition.
7) Use "top" command to check the total memory size.
8) Make permanent entry of "swap" space during reboot, Write a new line in "/etc/fstab"
/dev/sda6 swap swap defaults 0 0
save & exit (:wq)
9) Reboot Linux & Check.
That's it
This blog can be helpful who are interested in Linux,having basic knowledge of Linux Operating System & want to follow different Linux Based Services It contains direct justified hand's on exercise without making more concentration on Theory. Suggestions are welcomed.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment