LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-02-2005, 07:09 PM   #1
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Rep: Reputation: 30
Question about memory usage


Mem: 1029168k av, 972696k used, 56472k free, 0k shrd, 238064k buff
703988k actv, 120k in_d, 20760k in_c
Swap: 1052248k av, 103600k used, 948648k free 471912k cached

looking at the above from the top command I see I have a gig of ram and 970MB of that in use while only 56 megs free.

However 470 megs of that is cached.

I'm confused about which part of this memory is actually used?

Is cached in use, if not why do I have only 56 megs free and isn't everything in cache?

Thx
 
Old 08-02-2005, 07:15 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
I read an answer to this question on this forum once. Can't find it now, but I believe Linux caches memory that's why most of it is used up most of the time. After a heavy load anyway. Why not all the memory? Probably something to do with the OS leaving empty memory for it's operations. I believe it is the buffer for cache in some strange words. Because swaping of pages from the cache takes time, the OS leaves some portion of the memory free at all times so new stuff can come in the memory without using swap all the time.
 
Old 08-02-2005, 07:25 PM   #3
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Original Poster
Rep: Reputation: 30
Thx,

I want to be able to find out whether my machine is running out of ram basically and
this "cache" makes it quite hard to come to a valid conclusion.
 
Old 08-03-2005, 02:22 AM   #4
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
The simplest way to see if your machine is running out of RAM is to see if SWAP is used. In normal conditions swap would never be used and only physical ram will be used. So if free -m command says that swap is anything but 100% free you are running out of RAM. But don't run free -m after heavy load, because heavy load eats up memory and swap will probably be used, but hey that's what swap is for.
 
  


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
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Memory usage question oneandoneis2 Linux - General 2 06-27-2004 12:29 PM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM
memory usage question bmicielli Linux - Hardware 3 12-27-2003 07:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 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
Open Source Consulting | Domain Registration