LinuxQuestions.org
Register a domain and help support LQ
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 10-25-2004, 01:10 PM   #1
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Rep: Reputation: 30
How Linux uses RAM


I was working on my computer when suddenly I noticed the hard drive began to make a bit more noise. So I launched System Monitor to observe what was happening, and I noticed in a space of about 1.5 minutes the RAM being used on my machine climbed from about 298 or so to 422 before leveling off. (Just before it leveled off, at about 403 RAM or so I closed applications that I had open like nautilus and vi).

Is this normal for that kind of RAM usage to climb up like that? I hadn't done anything unusual like start an intense application. I was just editing a file in vi as I had been doing for the last 30 minutes or so. Could this be a sign of a bad program on my machine? I don't normally go out to the internet with it, but occasionally I do.

Thanks for any feedback.
 
Old 10-25-2004, 01:32 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Linux tries to use as much RAM as it can and only starts using swap when it absolutely, positively must. If you think about it, this actually makes sense. Why would you want things in swap, which is dog slow, when you have perfectly good RAM available? The whole idea of "free RAM" is one of those horrible Windows-think ideas that you need to discard when using Linux. As long as your applications are running decently, let Linux worry about how to manage memory.
 
Old 10-25-2004, 01:33 PM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Hard to say. Next time run top to show what is happening and which processes consume the most memory etc.
 
Old 10-25-2004, 03:18 PM   #4
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Thanks to both of you for your responses.

Hangdog42 -

Yeah thanks I had heard that Linux uses RAM differently than windows. And indeed I do have 1GB of RAM on this machine, a workstation, so there is plenty available. I just wanted to check to be sure that was what was going on.. That this is normal. I should have mentioned too that I had been running another application a few times before the RAM increase began and I can see where Linux may have recalculated and decided to use more RAM since there was more available.

ugge -

Thank you for your advice about "top". I will look into that.
 
Old 10-25-2004, 05:04 PM   #5
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 12.04/14.04, Scientific Linux 6.3/6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,791

Rep: Reputation: 157Reputation: 157
Also, be aware that a cron (or anacron) job could have been running to start utilizing system resources like that...

Mandrake especially is prone to do this. Essentially, cron (or anacron) runs jobs in the background that do typical system maintainance. Problem is that the processes occasionally have too much priority and slow down other things you might be doing... You can adjust how much and when cron will do these jobs. Doing so can be a pain though.
 
Old 10-25-2004, 08:39 PM   #6
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
Quote:
Could this be a sign of a bad program on my machine?
someone will correct me if i'm wrong, but no, this is not a concern. it is highly unlikely that you have any sort of spyware or virii hogging your system's resources. most of those are written for the 99% of the world that uses windows, and simply wouldn't know where to begin on a linux box.
 
Old 10-26-2004, 08:44 AM   #7
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
mcd: It might be a badly designed program that get couaght in a fork loop or something.

A remark: A cron or anacron job is scheduled task.
 
  


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
RAM: Does linux require as much ram as Windows XP? hanzj Linux - Newbie 48 04-18-2007 01:14 AM
Win98SE Pentium166MMX/64MB RAM vs Linux AthlonXP+ 3000/512MB RAM : Lucent LT WinModem t3gah Linux - Software 2 04-22-2005 02:01 PM
how much ram does linux use? capybara Linux - Hardware 4 05-26-2004 10:43 PM
Linux Does not see the RAM voitel Linux - Software 3 07-15-2001 07:13 PM
How much RAM can I use under Linux? shane664 Programming 1 04-02-2001 07:33 AM


All times are GMT -5. The time now is 01:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration