Difference Between Swap File and Swap Partition

By | September 30, 2009

Some difference between swap file and swap partition.

Swap File,

1. If the hard disk is full or corrupted,swap file will get damaged.
2. System speed get decrease as soon the hard disk space is full.
3. It should be on a particular location where it should not get
damaged or accidentally copied with other files.
4. It have advantage to increase the swap space on a system that have
already installed with linux.
5. In any case if we need to increase the swap space of the system
immediately we can do it.
6. We can able to create and keep the swap file on external device eg:
Express Card SSD
7. New kernel have nearly achieved to make both swap partitions and
swap file speed closer.
8. Swap file will get fragmented.

Swap Partition

1. Reside on a separate hard disk space.
2. Multiple Os on a single machine can share the same partition.
3. Fragmentation is less compare to swap file.
4. If hard disk is corrupted the swap partition would not be
functioning.
5. Reduce accident loss or corruption.

*Choice depend on the type of activity we are doing on the system.
Increasing Ram will increase the speed of the machine than the swap
system. But product price will be high.

Cheers!

Melbin Mathew

www.talk2melbin.com

Melbin Mathew

I am Melbin Mathew, Systems Engineer from Kerala, India. I live with my parents, daughter and my wonderful wife. I graduated in 2004 with a bachelor’s degree in Electronics and Hardware from Mahatma Gandhi University, Kottayam and completed certification in MCITP, RHCE, CCNA, VCP ...Read More
Category: Linux

About Melbin Mathew

I am Melbin Mathew, Systems Engineer from Kerala, India. I live with my parents, daughter and my wonderful wife. I graduated in 2004 with a bachelor’s degree in Electronics and Hardware from Mahatma Gandhi University, Kottayam and completed certification in MCITP, RHCE, CCNA, VCP ...Read More

  • http://bs012.nl bs012

    Hi Melbin,

    Some short reactions on your blog:

    If the disk is virtual even less differences exist.

    Multiple OS’s (as in multi boot I expect) can share a swap file also.

    If a file system gets to be completely full, a corrupted swap drive or file is the least of your problems. A corrupted file system is a bigger problem.

    You can use several swap partitions and drives at ones (spread them over different physical drives on different channels for extra performance).

    Greating, Thomas

    • http://www.talk2melbin.com Melbin Mathew

      Hi Thomas,

      Thank you for sharing the knowledge.

      Melbin Mathew