LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-20-2002, 01:54 PM   #1
ayhopkins
LQ Newbie
 
Registered: Apr 2002
Distribution: Linux
Posts: 14

Rep: Reputation: 0
Red Hat 7.2 Memory Eaten Up


My memory over time just gets eaten up and never released.

I have 2x 256 MB DIMMS and a AMD K6-2 400 Mhz which are recognized by the OS Redhat 7.2, and this memory works fine in a Windows machine. After time, the memory keeps getting used and never gets released, after a certain amount of memory usage around 80% I know I start getting errors. Crontabs at night start having failures. The swap file never gets used, and I am not running anything custom which would have memory leaks.

I can manually produce the effect by compiling standard programs. Eventually, I can stop these errors which don't indicate they are memory just generic errors of failure. I stop them by rebooting which clears the memory. In a few days I have to repeat the process. I actually tried this with two different sets of physical memory.

Does anyone have an idea what the problem is.

Very fustrated in Washington....

Ann
 
Old 04-20-2002, 03:32 PM   #2
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Can you give us any specific error messages?
 
Old 04-21-2002, 11:04 PM   #3
ayhopkins
LQ Newbie
 
Registered: Apr 2002
Distribution: Linux
Posts: 14

Original Poster
Rep: Reputation: 0
Wish it were that easy, but various processes will just fail with different errors. I have a 2.4.9 kernel, but I am think of compiling a new kernel as there are some messages on another site which indicate it might be memory management.

Thanks.
 
Old 04-21-2002, 11:26 PM   #4
PimpNasty
LQ Newbie
 
Registered: Apr 2002
Location: Central Wisconsin
Distribution: RedHat 7.2 w/ SGI XFS
Posts: 8

Rep: Reputation: 0
Next time this happens run the command 'free'. To the right of where it says "+/- buffers/cache" is the actual amount of RAM that is used by programs. As long as this value is small (Depending on what you do, probably around 100MB) this is perfectly normal. How much RAM is listed as being cached? Buffers??? Cached is stuff from your hard drive that is stored into RAM to make access quicker later. Depending on what you are compiling there might be a lot of disk IO that is filling up the cached area. When more RAM is needed the beffers and cached areas are cleared out for the programs to run in. If you are running Gnome, I know that Nautilus is a big memory hog.

I hope this helps.
 
Old 04-21-2002, 11:37 PM   #5
ayhopkins
LQ Newbie
 
Registered: Apr 2002
Distribution: Linux
Posts: 14

Original Poster
Rep: Reputation: 0
total used free shared buffers cached
Mem: 512948 509868 3080 48 93696 368508
-/+ buffers/cache: 47664 465284
Swap: 554232 0 554232

And recently haven't done much. That is about 1 day.

You know I wouldn't be so confused if it weren't for the fact that when I had 128MB of RAM I never had this problem.

 
Old 04-22-2002, 01:19 AM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
try memtest app available from http://www.qcc.sk.ca/~charlesc/software/memtester/
to see if you have a faulty RAM.
 
Old 04-22-2002, 08:06 AM   #7
aaronsols
Member
 
Registered: Feb 2002
Location: INDIA
Distribution: Red Hat
Posts: 30

Rep: Reputation: 15
Thanks neo77777 that memtest was a life saver for me, similarly do you know any tools to chek for video card cos time and again my X-Windows screen freezes, I doubt the video card....
 
Old 04-22-2002, 11:05 AM   #8
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Honestly I haven't come across any app that would test video memory on linux machine, but I am thinking of running one of the www.madonion.com apps such as 3DMark through wine, I haven't tried it yet, it mightn't work, but still it's worth the shot; probably you will get errors running DirectX tests, but who knows.
I believe your X freezes are related to the RAM failure. See if substitution of RAM fixes the problem.
Also take a look at vidtune, just be carefull with this app (search www.google.com/linux for vidtune, you might have it installed on your system as well).
 
Old 04-22-2002, 02:16 PM   #9
PimpNasty
LQ Newbie
 
Registered: Apr 2002
Location: Central Wisconsin
Distribution: RedHat 7.2 w/ SGI XFS
Posts: 8

Rep: Reputation: 0
ayhopkins: There is no problem from the data that you posted. At the time you ran 'free' you only had 47MB RAM used, the rest (about 368MB) was in hard drive caching. (files that you used, stored in RAM for faster use later) I know it looks bad with only 3MB RAM free but this is just how Linux does it.

Last edited by PimpNasty; 04-22-2002 at 05:03 PM.
 
Old 04-22-2002, 11:26 PM   #10
aaronsols
Member
 
Registered: Feb 2002
Location: INDIA
Distribution: Red Hat
Posts: 30

Rep: Reputation: 15
is there a way to stop Linux from caching the disk data to RAM cos at a given point we may not use all that the system has cached, alternatively can is there a way to move this cached data from RAM to SWAP area such that we have as much free RAM as possible
 
Old 04-23-2002, 07:40 AM   #11
KayJay
Member
 
Registered: Mar 2002
Location: dev/null
Distribution: redhat, mandrake
Posts: 218

Rep: Reputation: 30
Quote:
Originally posted by PimpNasty
ayhopkins: There is no problem from the data that you posted. At the time you ran 'free' you only had 47MB RAM used, the rest (about 368MB) was in hard drive caching. (files that you used, stored in RAM for faster use later) I know it looks bad with only 3MB RAM free but this is just how Linux does it.
you're right about this one... but what I am worried about is that the Swap stays empty... what u should try is to finger your swap.
try running tonnes of different processes and see what it does..
on one certain point your memory will be full and it will start writing to the swap.. if it doesnt it's something else.
 
Old 04-23-2002, 02:03 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally posted by aaronsols
is there a way to stop Linux from caching the disk data to RAM cos at a given point we may not use all that the system has cached, alternatively can is there a way to move this cached data from RAM to SWAP area such that we have as much free RAM as possible
Sync (info sync or alt+sysrq+s if enabled). Kinda uhhh, syncs mem with the disks :-]
Caching strategy can be changed somewhat by changing sysctl(8) values like vm.bdflush, vm.buffermem, vm.pagecache, vm.freepages, etc etc. Documentation for this is in /usr/src/<kernelversion>/Documentation/vm.txt.
AFAIK Linux only does swap out when forced, and there's no need/way to do it manually, like on the Space Shuttle there ain't no one gonna visual check if the gears went down right :-]
 
Old 04-23-2002, 02:11 PM   #13
ayhopkins
LQ Newbie
 
Registered: Apr 2002
Distribution: Linux
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for all the replys. I tried the memory test, worked great, but no errors.

I also kept running stuff until it started to use swap. It did use swap, but a day later it hasn't released the swap file usage.

total used free shared buffers cached
Mem: 512948 506728 6220 48 89168 374892
-/+ buffers/cache: 42668 470280
Swap: 554232 3712 550520

Same as it was 24 hours earlier.

I am going to have to try a new kernel, just probably not this week. I was kind of hoping Redhat would patch the kernel and the problem would go away.

I have compiled kernels before but it can be tedious going through all the options, if you don't quite know what they all mean.
 
Old 04-23-2002, 02:37 PM   #14
KayJay
Member
 
Registered: Mar 2002
Location: dev/null
Distribution: redhat, mandrake
Posts: 218

Rep: Reputation: 30
I've seen a thread like this on another forum and it turned out that the amount of memory u have totally has nothing to do with how much u keep free.
this is the same with windows machines... I saw clients with 750megz of ram and they had 400 used... and all they did was booting up windows and maybe use 3 or 4 apps. nothing unusual.
And the swap will be released when needed..
never forget, linux is a caching and logging whore. which is good
 
Old 04-23-2002, 11:19 PM   #15
PimpNasty
LQ Newbie
 
Registered: Apr 2002
Location: Central Wisconsin
Distribution: RedHat 7.2 w/ SGI XFS
Posts: 8

Rep: Reputation: 0
Don't worry about trying a new kernel if thats your only problem. You will have the exact same "problem" with the new kernel. It just uses uneeded RAM for cache and buffers and gives that RAM up when more RAM is needed to run a program in. Moving the cache and buffers to swap would be pointless because that is on a hard drive with the rest of your data.

It looks bad but it actually isn't. Thats just how linux does it.
 
  


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
How to refresh memory in Red Hat 9? hardian_97 Linux - Hardware 7 09-14-2005 11:59 PM
Memory req for Linux (Red Hat 9.0) linux_faq Linux - Software 2 06-04-2004 11:35 AM
Red Hat AS 2.1, Memory leak? gmccormack Linux - General 0 03-31-2004 01:59 PM
New memory Red Hat 9? nate0326 Linux - Hardware 2 12-23-2003 12:31 AM
Red Hat Memory Utilization chewy Linux - General 3 03-05-2003 07:22 PM


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