AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Software > OS, Software, Firmware, and BIOS > Linux

Linux Questions and information concerning Linux


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 3rd June, 2012, 06:17 AM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

How does Linux use it's swap file?

I'm asking because it seems to use it rather sparingly...or to be more precise, never.

Yet it's there! Is it only there to facilitate install...just guessing now LOL

I've never seen it any different from what it is now (See pic)
Attached Thumbnails
How does Linux use it's swap file?-screenshot-2012-06-02-22-17  
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic


Last edited by Daniel ~; 3rd June, 2012 at 02:01 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 3rd June, 2012, 10:49 AM
ThunderRd's Avatar
Irreverent Query Chairman
 
Join Date: June 2007
Location: NYC native in northern Thailand
Posts: 2,241

I'm not at my machine right now, but I think that I've got a 1.5G swap partition, and I have never seen Linux use more than 100-200Kb (and that is a rare thing.)

You could easily reduce the size of your swap partition with no ill effects.

Try these links for a bit of information on Linux 'swappiness':

Performance tuning Linux Kernel with swappiness parameter | Linux Poison

https://wiki.archlinux.org/index.php...ng_Performance
__________________
#1: Tt Armor, ASUS Maximus Extreme, QX9650@4.1G, 8G Corsair Dominator GT DDR3-2000, Corsair HX1050, H2O-Swiftech, Gigabyte GTX470/Arctic Accelero Xtreme Plus II, Intel 520 SSD, Kingston SSD, 2xRaptor 150G RAID0, Win 7 Pro 64
#2: Tt Shark, ASUS P5Q Pro Turbo, Q6600@3.8G, 4G HyperX-1600, Corsair HX850, CoolerMaster V10, 2xASUS 9600GT, 2xRaptor 74G RAID0, OCZ Vertex 4 SSD, Gentoo/siduction Linux [64-bit]
#3, #4: Opteron 170@2.75G nude, A8N-SLI Deluxe, Gentoo

AOA Folding @HomeOur sister site: www.gamersonlinux.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 3rd June, 2012, 02:02 PM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

Thanks for the hook up, I'll check it out!

It's been to long since I used gedit, can you walk me through this? I'm set at 60 BTW would like to try 10.

The default setting in Linux is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical desktop installation. A value of swappiness=10 is recommended, but feel free to experiment.

To check the swappiness value use command: cat /proc/sys/vm/swappiness

To make a change permanent, edit the configuration file with your favorite editor:

vi /etc/sysctl.conf
and add following parameter to the end of the file like so:

vm.swappiness=10

I can't remember how to bring up the config file... so sue me...":O}
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic


Last edited by Daniel ~; 3rd June, 2012 at 02:58 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 3rd June, 2012, 11:26 PM
Gizmo's Avatar
Chief BBS Administrator
BassTeroids Champion, Global Player Champion, Aim & Fire Champion, Puzzle Maniax Champion, Othello Champion, Canyon Glider Champion, Unicycle Challenge Champion, YetiSports 9: Final Spit Champion, Zed Champion
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 16,178
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

The swap file is used by Linux when it doesn't have enough physical memory on hand to keep everything in RAM.

With modern operating systems (yes, even windows), applications are launched in a 'virtual' memory space, which basically lets the application pretend that it is running by itself and has all of memory available to it. Of course, this is not actually the case, so there is a memory manager as part of the operating system that 'maps' the virtual space being used by the application (because very, VERY few applications actually use all of the virtual memory space they have access to, but rather only a small portion of it) to the physical memory addresses that are actually available. This mapping typically occurs at the hardware level (with a minimal amount of software assistance) and so normally incurs very little performance overhead.

As you get more and more applications running (or an application begins consuming more and more memory) you eventually get to a point where you can't satisfy the virtual memory request from physical memory any more. At this point, the memory manager has to make a choice; either deny the request outright, or figure out how to free up some memory.

Most applications, even when they have a lot of memory allocated, are typically only actually using a small portion of it at any one time. Since all memory is allocated in units called 'pages', the memory manager can keep track of how recently and how often a particular page of memory is being used. If it needs to free up physical memory, the memory manager goes through the page list and looks for memory that hasn't been recently used. This is where the swap file comes in.

Once the memory manager determines that a page of memory hasn't been used recently (where 'recently' is some arbitrarilly defined threshold that is operating system and version and sometimes even load dependent), that page of memory gets 'swapped out' to the swap file, and some internal markers get updated to let the memory manager know that page has been swapped out.

If at some later point, an application whose memory has been swapped out to disk decides that it needs to access the 'swapped out' memory, the memory manager will go through the process described above to determine what it can free up, and the pull the 'swapped out' memory back in.

For Windows, the 'swap file' is the paging file. On linux, it can either be the swap file or the swap partition (depending on how you set your system up).

Also on Windows, you MUST have a paging file defined; windows gets very pissy if you turn off the paging file, because windows uses the paging file for many things including named pipes and memory mapped files.

On Linux, you can turn off the swap file without any adverse effects (other than once you exhaust physical memory, you are done).

Regardless of operating system, it is possible to run into a situation where you are swapping continously, which thrashes the disk. This happens when your running applications require more actual working data in memory than you have physical memroy to accomodate. Once you get to this state, things start going downhill in a hurry and you can grind your system to a complete halt in short order as your hard drive becomes the system bottleneck.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 4th June, 2012, 04:30 AM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

Thank you gizmo, very clear.!

Say, I've most of my gedit skills back ...like cut and like paste... but I can't seem to remember "save".

If I login I can't reach gedit, when I try to "save as" my changes it says I don't have permission to change this read only file... I CREATED THIS SYSTEM!!!! LOL
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 4th June, 2012, 05:19 AM
ThunderRd's Avatar
Irreverent Query Chairman
 
Join Date: June 2007
Location: NYC native in northern Thailand
Posts: 2,241

You have to run your editor as root to be able to edit sysctl.conf.

try sudo? or gksu? I don't know for sure what Mint uses, but it's prolly sudo
__________________
#1: Tt Armor, ASUS Maximus Extreme, QX9650@4.1G, 8G Corsair Dominator GT DDR3-2000, Corsair HX1050, H2O-Swiftech, Gigabyte GTX470/Arctic Accelero Xtreme Plus II, Intel 520 SSD, Kingston SSD, 2xRaptor 150G RAID0, Win 7 Pro 64
#2: Tt Shark, ASUS P5Q Pro Turbo, Q6600@3.8G, 4G HyperX-1600, Corsair HX850, CoolerMaster V10, 2xASUS 9600GT, 2xRaptor 74G RAID0, OCZ Vertex 4 SSD, Gentoo/siduction Linux [64-bit]
#3, #4: Opteron 170@2.75G nude, A8N-SLI Deluxe, Gentoo

AOA Folding @HomeOur sister site: www.gamersonlinux.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 4th June, 2012, 11:23 PM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

When I su to root gedit won't open, when I don't, it will but I can save, no permission..
Attached Thumbnails
How does Linux use it's swap file?-screenshot-2012-06-04-15-26  
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic


Last edited by Daniel ~; 4th June, 2012 at 11:27 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 5th June, 2012, 01:23 AM
ThunderRd's Avatar
Irreverent Query Chairman
 
Join Date: June 2007
Location: NYC native in northern Thailand
Posts: 2,241

Code:
gksudo gedit
Then enter your password when it is requested. If that doesn't work, do you have nano or vim installed?
__________________
#1: Tt Armor, ASUS Maximus Extreme, QX9650@4.1G, 8G Corsair Dominator GT DDR3-2000, Corsair HX1050, H2O-Swiftech, Gigabyte GTX470/Arctic Accelero Xtreme Plus II, Intel 520 SSD, Kingston SSD, 2xRaptor 150G RAID0, Win 7 Pro 64
#2: Tt Shark, ASUS P5Q Pro Turbo, Q6600@3.8G, 4G HyperX-1600, Corsair HX850, CoolerMaster V10, 2xASUS 9600GT, 2xRaptor 74G RAID0, OCZ Vertex 4 SSD, Gentoo/siduction Linux [64-bit]
#3, #4: Opteron 170@2.75G nude, A8N-SLI Deluxe, Gentoo

AOA Folding @HomeOur sister site: www.gamersonlinux.com

Last edited by ThunderRd; 5th June, 2012 at 01:26 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 5th June, 2012, 02:28 AM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

Oh, you one tricky guy ThunderRd! Here it is all "Saved as." and Many thanks!

So this doesn't change the size of the swap file, just how much my install uses it?
Attached Thumbnails
How does Linux use it's swap file?-screenshot-2012-06-04-18-24  
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 5th June, 2012, 07:50 AM
ThunderRd's Avatar
Irreverent Query Chairman
 
Join Date: June 2007
Location: NYC native in northern Thailand
Posts: 2,241

Quote:
Originally Posted by Daniel ~ View Post
So this doesn't change the size of the swap file, just how much my install uses it?
Correct, but since it wasn't using it very often to begin with, you most likely won't notice any difference.

Is your swap a file or a partition?
__________________
#1: Tt Armor, ASUS Maximus Extreme, QX9650@4.1G, 8G Corsair Dominator GT DDR3-2000, Corsair HX1050, H2O-Swiftech, Gigabyte GTX470/Arctic Accelero Xtreme Plus II, Intel 520 SSD, Kingston SSD, 2xRaptor 150G RAID0, Win 7 Pro 64
#2: Tt Shark, ASUS P5Q Pro Turbo, Q6600@3.8G, 4G HyperX-1600, Corsair HX850, CoolerMaster V10, 2xASUS 9600GT, 2xRaptor 74G RAID0, OCZ Vertex 4 SSD, Gentoo/siduction Linux [64-bit]
#3, #4: Opteron 170@2.75G nude, A8N-SLI Deluxe, Gentoo

AOA Folding @HomeOur sister site: www.gamersonlinux.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 5th June, 2012, 07:59 AM
chrisbard's Avatar
Benchmarker
 
Join Date: March 2003
Location: Earth
Posts: 8,252
Send a message via Yahoo to chrisbard

What an interesting reading, how very easy it is
__________________
I've heard that linux community came up with better implemented security in it's latest Linux Mint Gold version, it's actually preventing the user to log in, thus posing 0 risk in contamining the computer with malware! Well done to the open source community!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 5th June, 2012, 04:25 PM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

Quote:
Originally Posted by ThunderRd View Post
Correct, but since it wasn't using it very often to begin with, you most likely won't notice any difference.

Is your swap a file or a partition?
It shows up as an 8 gig partition along with 8 gigs of extended space, the rest is all a single volume.
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 5th June, 2012, 04:27 PM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

Quote:
Originally Posted by chrisbard View Post
What an interesting reading, how very easy it is
It really is. just cut and paste, just haven't done anything with terminal in several years... Mint, rarely needs it...
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 6th June, 2012, 03:33 AM
Gizmo's Avatar
Chief BBS Administrator
BassTeroids Champion, Global Player Champion, Aim & Fire Champion, Puzzle Maniax Champion, Othello Champion, Canyon Glider Champion, Unicycle Challenge Champion, YetiSports 9: Final Spit Champion, Zed Champion
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 16,178
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

Quote:
Originally Posted by chrisbard View Post
What an interesting reading, how very easy it is
Yeah, rather like editing the registry when you aren't familiar with regedit (or is it regedt32, no wait, I need to use poledit, woops no, that's gpedit...)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 11th June, 2012, 10:07 AM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

Not sure that comparing Linux from 2012 with Windows from 2000 is really a fair comparison there.

Since the release of Windows XP regedit and regdt32 result in the same code being executed. Additionally gpedit pretty much replaced poledit, as gpedit allows you to edit both the local policy and group policy. Anyhow, you don't have to use gpedit to set group policy - you can use regedit if you desire to have an in-depth knowledge of the registry.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 11th June, 2012, 04:19 PM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

That sounds great,,, how much does it cost again? ":O}
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 14th June, 2012, 06:07 PM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

A bit less than a copy of Red Hat Enterprise Linux for the desktop?
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 14th June, 2012, 06:43 PM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 45,606

Perhps we should avoid them both! Perhaps each has it's place. ":O}

How have you been A?
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and Mercy ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur

[img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img]
Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
linux , swap file



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide: Manage the swap file size! MrSeanKon OS, Software, Firmware, and BIOS 0 2nd August, 2006 07:52 AM
swap file MONKEYMAN General Hardware Discussion 4 1st September, 2005 02:13 PM
Ninja File Managers - Suggest a killer file organization app. DimViesel OS, Software, Firmware, and BIOS 0 6th September, 2004 09:35 AM
fedora linux and samba file sharing stigweed OS, Software, Firmware, and BIOS 3 9th February, 2004 07:14 PM
BIOS file shows up as BootVis trace file chile EPoX MotherBoards 2 17th January, 2004 10:51 PM


All times are GMT +1. The time now is 12:42 AM.


Copyright ©2001 - 2010, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0