• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Life always offers you a second chance ... Its called tomorrow !!!

    Thursday, January 30, 2014

    What is Virtual memory, paging and swap space ?


    A process normally runs on physical memory where the memory is divided into sets of pages. A page is a 4kb area of memory and is the basic unit of memory with which both kernel and CPU deal.

    There might be a situation when all the pages in physical memory goes full. In such cases all the inactive pages inside physical memory is shifted to the secondary storage or the swap space using the paging technique. By doing this physical memory gets free pages which can again be utilized by new processes. This entire process is termed as swapping.

    NOTE: Swapping is a good idea as it gives you an additional space to store data files and programs when your physical memory is out of space but accessing a hard disk is hundred times slower than accessing memory.

    Virtual memory is a memory management technique that is implemented using both hardware and software which gives an application program the impression that it has contiguous working memory (an address space).

    In simple terms Virtual memory is a logical combination of RAM memory and swap space which is used by running process

    NOTE: It is NOT just an additional space used in hard disk to make it act as physical memory


    This is one of the memory management technique schemes by which a computer can store and retrieve data from secondary storage for use in main memory.

    Swap space

    This is a space on the hard disk which is used by the operating system to store data pages that are currently not needed. This swap sapce can be a partition as well as swap file.

    Amount of RAM in the system recommended amount of swap space
    4GB of RAM or less a minimum of 2GB of swap space
    4GB to 16GB of RAM a minimum of 4GB of swap space
    16GB to 64GB of RAM a minimum of 8GB of swap space
    64GB to 256GB of RAM a minimum of 16GB of swap space
    256GB to 512GB of RAM a minimum of 32GB of swap space

    Related Articles
    What is kernel-PAE in Linux?
    What is a Kernel in Linux?
    What is swappiness and how do we change its value?
    What is the difference between POP3 and IMAP?
    What is GRUB Boot Loader ?

    Follow the below links for more tutorials


    Post a Comment