Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-16-2014, 11:06 AM   #1
Registered: Dec 2011
Posts: 253

Rep: Reputation: Disabled
Idle swap partition

As usual, I have created swap partition but I have never seen that my system ever use it. Here is an output:
14:32:42 ~>free -m
              total        used        free      shared  buff/cache   available
Mem:           3855        1782         143         137        1930        1686
Swap:          1023           0        1023
If swap just lies idle then whats the purpose of its creation?
Old 12-16-2014, 11:44 AM   #2
Senior Member
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18.2 at present.
Posts: 1,293

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
It was mainly used when physical memory was expensive and low capacity, nowadays most new PCs come with up to 8Gb of memory so there's no need for blocks of program to be paged in and out of the swap space on the disk, the whole program can be memory resident.

If, instead of shutting down your laptop you select "sleep", the physical memory contents will be saved to a special file which lives on the swap partition making it quicker to start up. (It doesn't have to boot.) If you use hibernate instead, the contents of physical memory are kept "live" but you've a greater risk of losing work as contents may not be in sync with what's on the disk if the power fails/battery gives up.

Play Bonny!

Old 12-16-2014, 12:32 PM   #3
Registered: Dec 2011
Posts: 253

Original Poster
Rep: Reputation: Disabled
Hmm... it means a peson (like me) who do not use either of these two functions (sleep and hibernate) can simply delete the swap partition!
Old 12-16-2014, 01:08 PM   #4
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182
Member response


Swap is not just for sleep or hibernation. If you are working with a application that is a memory hog or you have multiple app open with that same app you could logically end up needing swap. If you do not have a swap then when one is needed then things can really hang or cause system issues. With the cost for storage media low per GB then having a swap is not really a issue for large storage. Even with a large memory footprint your system can get to a point where swap would be necessary.

If you do a lot of modeling or applications that do require larger page counts then you had better have a swap. Insurance!
Hope this helps.
Have fun & enjoy!
Old 12-16-2014, 01:29 PM   #5
Registered: Dec 2011
Posts: 253

Original Poster
Rep: Reputation: Disabled


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Swap partition against swap file: how much performance do I loose? stf92 Slackware - Installation 12 03-15-2014 06:48 PM
Would a Linux swap partition work as a FreeBSD swap partition? Froggy192 *BSD 11 07-27-2013 03:06 PM
swap file vs. swap partition verndog Ubuntu 16 07-09-2012 09:49 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 03:16 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 11:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration