LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-27-2004, 11:26 AM   #1
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Memory usage question


When I first start up my computer, free (and my GKrellM) reports I'm using 70-80MB RAM.

After a while, this creeps up to ~180MB, where it sits fairly constantly - Buffering and caching in action, I'm assuming..?

Except when I start doing a load of compiling (Putting together an LFS distro), when the memory usage drops back down to 80-odd.

So, two questions - why does compiling make reported memory usage drop?
Are there any simpler ways I can 'clear' the memory in the same way that compiling does, so I can tell exactly how much memory is ACTUALLY being used?
 
Old 06-27-2004, 12:02 PM   #2
andrew001
Member
 
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321

Rep: Reputation: 30
on memory 'clearing'

On clearing memory:
You should really let the operating system handle memory management.
Have you tried using the 'free' command to monitor memory usage?

Compiling theory:
perhaps when you compile the compiler is allocating memory that was used for the cache, and then when the memory is freed, since it is no long caching, you are actually seeing it as freed.

~Andrew
 
Old 06-27-2004, 12:29 PM   #3
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Original Poster
Rep: Reputation: 48
Quote:
Have you tried using the 'free' command to monitor memory usage?
Yup - here's some typical output. The only thing different between the two was how long it had been since I compiled something. The same processes were running both times:

total used free shared buffers cached
Mem: 503 394 108 0 29 288
-/+ buffers/cache: 76 427

total used free shared buffers cached
Mem: 503 461 42 0 32 301
-/+ buffers/cache: 127 376
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about memory usage stefaandk Linux - Newbie 3 08-03-2005 02:22 AM
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
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 - General

All times are GMT -5. The time now is 07:51 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