LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2015, 12:23 PM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Why Swap Partition never used ?


Hello.
Why in my system Linux never use Swap Partition? My Linux Box is Debian Jessie x64.
I attached a photo that you can see it.

Thank you.
Attached Thumbnails
Click image for larger version

Name:	monitor.png
Views:	93
Size:	61.6 KB
ID:	19764  
 
Old 10-09-2015, 12:43 PM   #2
Hasek39
Member
 
Registered: Jul 2015
Location: Pittsburgh, PA, US
Distribution: Slackware
Posts: 120

Rep: Reputation: Disabled
If you have about 8 GB of RAM, swap is only needed for hibernation. Do you use this feature? I am sure that if you try to use hibernate instead of shutdown your computer for a couple of days you will see something used in swap. Swap partition will be never used if your computer has 8 GB RAM and you shutdown it every day -- no swap is needed and it's normal.
 
Old 10-09-2015, 01:02 PM   #3
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, Centos
Posts: 368
Blog Entries: 5

Rep: Reputation: 264Reputation: 264Reputation: 264
Increase the swappiness parameter if you really want to slowdown your system for no reason at all
 
1 members found this post helpful.
Old 10-09-2015, 01:25 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Swap is used in two cases (well, three if you count hibernation):
- Your system runs out of RAM and needs to swap out currently unused parts to make place for currently used parts. If you have enough RAM that your workload fits completely into it this won't happen.
- The system determines that a task is idle for very long times and the memory it uses can better be used for caching. This mostly happens on long running systems which tasks that only run occasionally. An example would be an always running mail-client that checks for mail every few hours, but does nothing in between.

It seems that neither is the case for you, so no need to worry. A problem would be if neither is the case but the system would still be hitting swap.
 
Old 10-09-2015, 04:54 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
There used to be a great need for swap.
Over the years the need for it has been reduced in most home users systems only because modern ram is so cheap and fast and amounts are large.

Some programs still might go to swap, but for the most part it will only be there if needed.

The old rule of some multiple is not valid anymore. 2.5 time ram is not a great guess anymore. Swap generally never hurts so you can safely keep it. Making it too large may not hurt anymore too because hard drives are so large relative to past.

You still have choices to make raid swap, change swap settings as in joke about swappines, and can make swap files too.
 
Old 10-09-2015, 07:48 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I am curious as to why one would expect swap to be used when only 25 of RAM is being used? Why is the question being asked?
 
Old 10-09-2015, 07:56 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
threadcount++?
 
Old 10-09-2015, 08:59 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Newbie question I assume. ??
 
Old 10-10-2015, 06:48 AM   #9
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Thank you so much.
But Windows OS use Page files every time .
 
Old 10-10-2015, 06:51 AM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by hack3rcon View Post
Thank you so much.
But Windows OS use Page files every time .
Only on older versions, I think, and it's due to Windows memory management being a little dense.
As mentioned above there may be legitimate reasons to place data into swap, to free up RAM for a disk cache of more often used data for example, but if there is plenty of RAM there is simply no need to use swap. As far as I can tell Windows no longer uses the swap when it is not needed after about Windows 7 -- though I suspect some is sometimes allocated but not actually used.
 
2 members found this post helpful.
  


Reply



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 05:48 PM
Would a Linux swap partition work as a FreeBSD swap partition? Froggy192 *BSD 11 07-27-2013 02:06 PM
swap file vs. swap partition verndog Ubuntu 16 07-09-2012 08:49 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:55 AM.

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