Go Back   nV News Forums > Linux Support Forums > General Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 11-19-02, 09:04 PM   #1
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default Memory Leak!

This is most definitely a problem.

First of all, the problem that I noticed was that UT occasionally stutters after playing for a little bit.

But, the problem doesn't appear to be related to UT.

For example, right now, at the beginning of writing this post, I'm sitting at about 245MB of memory in use. The only programs I'm currently running are XMMS, KPPP, and Mozilla. There's no way that these three (in combination with whatever Linux is running in the background...drivers and whatnot) should take up that much memory.

As an example, after booting up completely, I was sitting at around 90MB of memory in use. I also looked at top for a few moments, and I could actually see the memory usage climb, by about 8kb/sec.

Finally, at the end of writing this message, I'm sitting at about 251MB of memory in use.

Has anybody seen a problem like this, or have an idea of how to fix it? I suppose I may have quite a lot of debugging to do...but I was hoping somebody else out there might have some hints...
Chalnoth is offline   Reply With Quote
Old 11-19-02, 09:08 PM   #2
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default

Oh, yeah, and I guess it could help to give my system specs as well.

I'm running on an nForce 415-D chipset motherboard, with the latest drivers installed (246, I believe).

For the sound, I'm no longer using the nForce drivers, but I'm instead using the alsa i8x0 drivers. nVidia's nForce drivers don't work with everything, though the Alsa drivers have problems with sound quality sometimes...damn I hope that all gets worked out soon.

I'm also running a GeForce4 Ti 4200 with the 3123 drivers.

I downloaded and am running Fluxbox as the display manager. I also had to turn off apmd at startup so the machine wouldn't crash.

Everything else is from the default installation of RedHat 7.3.
Chalnoth is offline   Reply With Quote
Old 11-19-02, 11:14 PM   #3
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default

I guess I'll just talk to myself some more...

Well, it looks like there might not be a memory leak after all. After looking around a bit on this forum, I noticed that it could just be the cache. In fact, just after posting, the amount of used memory started to approach my installed RAM amount (256MB). It didn't exceed it. Now I'm sitting at about 105MB of used memory minus cache and buffer.
Chalnoth is offline   Reply With Quote
Old 11-19-02, 11:31 PM   #4
The Baron
Guest
 
Posts: n/a
Default

Guy I know had a similar problem... and this is what it was:

http://www.redhat.com/mailing-lists/.../msg04789.html

http://www.redhat.com/mailing-lists/.../msg04816.html

Not using swap.

Now, with you being you, I should PROBABLY assume that swap is fine... but oh well.
  Reply With Quote
Old 11-20-02, 12:24 AM   #5
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default

Yeah, swap appears to be working just fine.

But, it's really looking like the problem is simply that Linux is using up too much system RAM with cache, resulting in unecessary swap usage.

That is, I think what's happening is it's getting within about 5MB of my total RAM (which is probably far too low, considering the RAM is almost certainly highly fragmented...), and when UT's RAM requirements change a bit mid-game, I get massive stalls.

After reexamining the memory usage, though, I should have plenty. It would be nice if I could find a variable that I could modify to reduce the amount of RAM that the cache will attempt to use, and see if that fixes the stuttering problems.
Chalnoth is offline   Reply With Quote
Old 11-20-02, 07:45 AM   #6
de><ta
prodigy
 
de><ta's Avatar
 
Join Date: Jul 2002
Location: USA, NY
Posts: 1,100
Default

what distribution of linux are you using and what version?

I also doubt that flux and the rest of the applications you have running in the background chew up that much RAM.

What exactly did you taylor or change???

9o mb at the start is fairly high, I get about that much using KDE with all the widgets and background application running.

How much of swap have you allocated by the way?

Have you tried looking up what the memory is actually being allocated to?
__________________
IBM T60p | Intel Core 2 Duo T7200 | 2GB PC2-5300 | ATi M X1700 256MB | 100GB 7200rpm SATA

///m-powered | Intel i7 920 | EVGA x58 | 6GB DD3 1600 | EVGA GTX 285 SSC | 150GB VelociRaptor

Drag racing is for fast cars. Autocrossing is for fast drivers.
de><ta is offline   Reply With Quote
Old 11-20-02, 10:47 AM   #7
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default

Please read my second post.
Chalnoth is offline   Reply With Quote
Old 11-21-02, 07:55 PM   #8
kappax
Registered User
 
Join Date: Oct 2002
Posts: 56
Default

LOL, THIS IS NOT A MEM LEAK! this is good that you ram is used up!. THIS IS NOT WINDOWS.

Linux uses a cache,

type top and you will see it!!

Mem: 515164K av, 347116K used, 168048K free, 0K shrd, 9184K buff
Swap: 1028152K av, 0K used, 1028152K free 230180K cached


look at all that cached, and look at my used and my av.

this is normal to have verry little "FREE" ram.

if someting needs the ram it will get it, but till then it sits in the cache, and so apps that have benopen befor will open again but faster , insted of pullin from the HD it will pull from the cache (ram)


this is noraml not a problem.
kappax is offline   Reply With Quote

Old 11-21-02, 07:59 PM   #9
kappax
Registered User
 
Join Date: Oct 2002
Posts: 56
Default

Quote:
Originally posted by Chalnoth
Yeah, swap appears to be working just fine.

But, it's really looking like the problem is simply that Linux is using up too much system RAM with cache, resulting in unecessary swap usage.

That is, I think what's happening is it's getting within about 5MB of my total RAM (which is probably far too low, considering the RAM is almost certainly highly fragmented...), and when UT's RAM requirements change a bit mid-game, I get massive stalls.

After reexamining the memory usage, though, I should have plenty. It would be nice if I could find a variable that I could modify to reduce the amount of RAM that the cache will attempt to use, and see if that fixes the stuttering problems.
the cache does not make you swap. LINUX is smart. if it needs ram it will wipe something from the cache. if you have less than 12 megs in swap then there is no problem ( or if you do you just have verry little ram), Linux can be run on 4 megs of ram.

Linux has great memery managment.

If you dont want your computer using swap, then turn swap off! via editing the fstab. I know many ppl that have 512+ megs ram that dont use swap, i use swap because i am often working with files 1 gig +
kappax is offline   Reply With Quote
Old 11-21-02, 09:44 PM   #10
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default

Quote:
Originally posted by kappax
LOL, THIS IS NOT A MEM LEAK! this is good that you ram is used up!. THIS IS NOT WINDOWS.
I take it you didn't read my fourth post down. And yes, swap is being used. I would never have thought this was a problem if I hadn't seen symptoms that were reminiscent of a memory leak.

Typically what I notice is that after such a stall in UT (generally while the system still is using ~100MB of cache), the amount of swap used increases. This means, to me, that the cache isn't being cleared out fast enough to eliminate the need for the swap. In other words, I'd really like to see an option to force Linux to leave some more free RAM, and see if that fixes the problem. I'm sure it's possible to make Linux do this, but I was hoping that there was an option for it.

Regardless, I'm going to be moving back to Windows for at least a little bit. Sound doesn't seem to be working with my nForce2 (although it is no longer crashing upon loading Gnome/KDE). I'll return to Linux when some new sound drivers are released.
Chalnoth is offline   Reply With Quote
Old 11-22-02, 01:41 AM   #11
Chalnoth
Registered User
 
Join Date: Jul 2002
Posts: 1,293
Default

Update:

One other thing, I'm not actually completely convinced there isn't a memory leak going on. Even taking the cache/buffer into account, memory usage is way above what it seems it should be.

For example, you're showing about 110MB of memory in use. Running rather few programs, I was showing about 140MB (cache taken into account). Anyway, I guess I'll have to do a more in-depth analysis to be certain. I suppose I'll do that later.
Chalnoth is offline   Reply With Quote
Old 11-22-02, 01:54 PM   #12
lunix
Registered User
 
lunix's Avatar
 
Join Date: Jul 2002
Location: Vancouver
Posts: 69
Send a message via MSN to lunix
Default

Chanloth it is not a memory leak. What is happening is that X is mmaping your AGP aparature and adding your graphics card memory as allocated memory. When top asks how much memory each application is using X reports way more memory than it is actually using skewing the results.
__________________
Gentoo
lunix is offline   Reply With Quote
Reply


Thread Tools

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
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
xorg memory leak? amast NVIDIA FreeBSD 0 09-01-12 08:36 PM
Memory leak in KDE plasma-desktop process with Nvidia driver shmerl NVIDIA Linux 0 08-07-12 10:27 AM
DOE Doles Out Cash to AMD, Whamcloud for Exascale Research News Latest Tech And Game Headlines 0 07-12-12 07:50 PM
Xorg Memory Leak AndrewM NVIDIA Linux 1 07-02-12 11:30 AM
Measuring card memory usage peter_ga NVIDIA Linux 0 05-24-12 08:07 PM

All times are GMT -5. The time now is 10:18 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.