LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-23-2010, 11:28 AM   #1
unkie888
Member
 
Registered: Aug 2007
Posts: 67

Rep: Reputation: 26
FC13 all ram used, but swap not used - suspicious..


I am confused as to why the operating system is not using swap.

I am using Fedora Core 13, it did have 4GB of ram, all of the ram was used. performance was poor. I used free and top to check if it was swapping - according to both, swap was NOT used at all. Never the less, I upgraded to 8GB and performance improved a lot.

However, once again, free and top state that ALL the ram is utilised, yet NONE of the swap is utilised. I find this suspicious.

Please see the output below.

Can anyone explain this. thanks.


Code:
# free
             total       used       free     shared    buffers     cached
Mem:       8187616    8128084      59532          0    1701312    5370920
-/+ buffers/cache:    1055852    7131764
Swap:     24575976          0   24575976
# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda1                               partition       4095996 0       -1
/dev/sdb1                               partition       4095996 0       -2
/dev/sdc1                               partition       4095996 0       -3
/dev/sdd1                               partition       4095996 0       -4
/dev/sde1                               partition       4095996 0       -5
/dev/sdf1                               partition       4095996 0       -6


 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-23-2010, 11:39 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,575

Rep: Reputation: 220Reputation: 220Reputation: 220
Do you understand what this line means:

-/+ buffers/cache: 1055852 7131764

Basically, you are only really using approximately 1GB of ram and the other 7GB are for cache. Linux caches disk reads to ram and will use all available ram to do so. In that sense the ram is used but if an application needs ram, space in cache will be cleared for the application. Caching disk reads to ram greatly improves performance as disk reads are orders of magnitude slower than ram. It's why applications start up slowly when you first boot up but load much faster the second or third time you launch them. In the later case, you are loading from the ram cache and in the former case you are loading from disk.

The performance increase when going from 4GB to 8GB of ram would indicate you are using some application that needs to read a lot of data from disk and that when that data is cached to ram, performance should greatly improve. Another characteristic of linux memory management and disk caching is that swap is avoided whenever possible so you will see the disk cache fill up to the max and then stop before any swap is used.

In short, what you are seeing is completely normal. What is unusual is the amount of disk caching going on but that is probably the result of the particular applications you are using. Very few applications will need to cache 7GB of disk reads to ram but once cached, they just stay there until ram is needed by another application and the disk cache is then moved out to make room for the application. Heavy video editing or graphically intense applications can cause this type of disk caching activity.

Last edited by kilgoretrout; 09-23-2010 at 11:52 AM.
 
2 members found this post helpful.
Old 09-23-2010, 11:42 AM   #3
unkie888
Member
 
Registered: Aug 2007
Posts: 67

Original Poster
Rep: Reputation: 26
Lightbulb

that explains it. thanks.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Swap=2 x RAM diptanjan Linux - Newbie 15 07-19-2007 03:18 AM
Need for SWAP with 1 GB RAM? Aleksandersen Linux - Newbie 36 02-26-2007 08:54 PM
RAM and Swap shiny_spoon Linux - General 5 01-13-2004 03:27 PM
No SWAP but all RAM!! hari_seldon99 Linux - General 3 01-13-2004 11:48 AM
Swap and RAM ? mikeshn Linux - General 1 09-18-2002 10:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration