nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   General Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=27)
-   -   Memory Leak! (http://www.nvnews.net/vbulletin/showthread.php?t=4250)

Chalnoth 11-19-02 09:04 PM

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 11-19-02 09:08 PM

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 11-19-02 11:14 PM

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.

The Baron 11-19-02 11:31 PM

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. :p

Now, with you being you, I should PROBABLY assume that swap is fine... but oh well.

Chalnoth 11-20-02 12:24 AM

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.

de><ta 11-20-02 07:45 AM

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?

Chalnoth 11-20-02 10:47 AM

Please read my second post.

kappax 11-21-02 07:55 PM

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 11-21-02 07:59 PM

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 +

Chalnoth 11-21-02 09:44 PM

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 11-22-02 01:41 AM

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.

lunix 11-22-02 01:54 PM

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.


All times are GMT -5. The time now is 07:57 PM.

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