Sunday, January 16, 2011

How to increase the size of memory on linux?

■ Requirement : How to increase the size of virtual memory
■ OS Environment : Linux[RHEL, Centos]
■ Implementation Steps : 

When a Linux system is initially set up, a swap partition is created on the hard drive that will be used as virtual memory in Linux, along with other partitions used for data.

Here are the steps to create the swap file :

#dd if=/dev/zero of=/mnt/swapfile bs=1M count=1024
#mkswap /mnt/swapfile
#swapon /mnt/swapfile
#echo "/mnt/swapfile none swap defaults 0 0" >> /etc/fstab

No comments:

Post a Comment