LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-18-2002, 08:32 PM   #1
mikeshn
Member
 
Registered: Feb 2002
Distribution: Fedora Core 2
Posts: 586

Rep: Reputation: 30
Swap and RAM ?


Hello

I have a question. I use Red Hat 7.3 ( Kernel2.4.18-10). In the table below it shows that the Mem free is (7220) and Swap Used is (11948). My question is why Kernel starts use the Swap when there still is free RAM memory?

[mike@localhost etc]$ free
total used free shared buffers cached
Mem: 255828 248608 7220 0 6736 111456
-/+ buffers/cache: 130416 125412
Swap: 521600 11948 509652

Thanks
 
Old 09-18-2002, 09:33 PM   #2
gway
LQ Newbie
 
Registered: Sep 2002
Distribution: Slackware
Posts: 24

Rep: Reputation: 15
Hi,
its how the virtual memory algoritm works (how it is programmed). The idea is that you always leave a bit of free RAM for new programs, and that that swap you see there is for programs that are running but are not often used. So, why is there someting in swap? To get more free RAM for more active programs, linux puts unused programs in swap. Why is there a little unused RAM? To make place with new programs (else, it would have to first make room for them and then load them).

My english writing is pretty bad at this time of the night, hope it could be understand =)

-- Gway
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use RAM as swap??? oneandoneis2 Linux - General 3 08-19-2004 04:48 AM
Not using RAM and Swap much ? ruwach Linux - Hardware 2 06-11-2004 07:26 AM
RAM and Swap shiny_spoon Linux - General 5 01-13-2004 02:27 PM
No SWAP but all RAM!! hari_seldon99 Linux - General 3 01-13-2004 10:48 AM
why swap should be twice of RAM? whitefox Slackware 17 04-19-2003 02:51 PM


All times are GMT -5. The time now is 10:42 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration