jagwah Posted November 25, 2006 Report Share Posted November 25, 2006 (edited) Both my systems are running Mandriva 2007, 1 the Free DVD version, and 1 the Powwerpack DVD version, both have 2 gig of RAM, and both display the same problem. If I download large files, say DVD/CD ISO's, or do an update through MCC Software Manager, and or install a couple of hundred MB of software, something that takes a little bit of time, almost all my RAM will be used up and it will have started eating into my swap. Just doing normal things, using Firefox, Amarok etc, it seems sometimes that the RAM that a program uses does not free up when that program is stopped and the amount of used RAM accumulates. Heres an example after just having Firefox open with 2 tabs, and downloading a 4.3 GB DVD ISO, been running for about 6 hours. free total used free shared buffers cached Mem: 2075524 2018396 57128 0 62508 1482152 -/+ buffers/cache: 473736 1601788 Swap: 2152668 184 2152484 Any ideas? Edited November 25, 2006 by jagwah Quote Link to comment Share on other sites More sharing options...
scarecrow Posted November 25, 2006 Report Share Posted November 25, 2006 Next time you encounter that problem, open a console and type in top Pass the outcome here. Quote Link to comment Share on other sites More sharing options...
daniewicz Posted November 25, 2006 Report Share Posted November 25, 2006 You can add the following line to the end of /etc/sysctl.conf to decrease the tendency to use the swap file: vm.swappiness=10 This changes the value from the default of 60 to a value of 10. The value being used can be checked with cat /proc/sys/vm/swappiness Quote Link to comment Share on other sites More sharing options...
iphitus Posted November 26, 2006 Report Share Posted November 26, 2006 read that again. mandriva ISNT using up all your ram. look at the buffers and cached bits. that's normal. the system always heavily caches recently opened files and things. this is because ram can be freed instantaneously, so using spare ram for caches has no cost or disadvantage whatsoever, because the moment the ram is needed, it just uses up ram that the cache has been in. The result of this is that you get a noticable speed boost starting frequently used programs and files, with no disadvantage whatsoever. This is normal. This is not a bug, no problem here. James Quote Link to comment Share on other sites More sharing options...
jagwah Posted November 26, 2006 Author Report Share Posted November 26, 2006 (edited) Next time you encounter that problem, open a console and type intop Pass the outcome here. top - 11:37:29 up 2:48, 1 user, load average: 0.02, 0.03, 0.00 Tasks: 96 total, 1 running, 95 sleeping, 0 stopped, 0 zombie Cpu(s): 1.8% us, 0.0% sy, 0.0% ni, 97.8% id, 0.2% wa, 0.2% hi, 0.0% si Mem: 2075524k total, 2023428k used, 52096k free, 97836k buffers Swap: 2152668k total, 0k used, 2152668k free, 1534964k cached That is after about 2 and a half hours, all that was happening during that time was that Firefox was open (1 tab) and I downloaded 2 x 700MB ISO's. You can watch the memory usage continually rise, at the rate of approx 10000KB a minute. You can add the following line to the end of /etc/sysctl.conf to decrease the tendency to use the swap file: vm.swappiness=10 This changes the value from the default of 60 to a value of 10. The value being used can be checked with cat /proc/sys/vm/swappiness Thanks, I'll store that away in my little tips and tricks file, but I don't think I should be using any swap at all with 2GB of RAM, especially while only running Firefox and downloading a couple of files :sad: Time to reboot ... again Edited November 26, 2006 by jagwah Quote Link to comment Share on other sites More sharing options...
jagwah Posted November 26, 2006 Author Report Share Posted November 26, 2006 I have just tried it using Konqueror instead of Firefox, exactly the same thing happens, if I cancel the download, the constant increase in RAM usage stops, and drops a little, but not as low as it was before the download started. Quote Link to comment Share on other sites More sharing options...
iphitus Posted November 26, 2006 Report Share Posted November 26, 2006 read what I said, you're wasting your time trying to fix a problem that doesnt exist. this is normal behaviour. it is normal for the kernel to have large caches in unused ram. there is no disadvantage to having large caches in unused ram. if you dont want swap to occur, remove the swap, but from what i've seen so far practically 0 swap is being used anyway on your system so there's no harm. James Quote Link to comment Share on other sites More sharing options...
jagwah Posted November 26, 2006 Author Report Share Posted November 26, 2006 (edited) read what I said, you're wasting your time trying to fix a problem that doesnt exist. this is normal behaviour. it is normal for the kernel to have large caches in unused ram. there is no disadvantage to having large caches in unused ram. if you dont want swap to occur, remove the swap, but from what i've seen so far practically 0 swap is being used anyway on your system so there's no harm. James Sorry, I didn't see your first post, but..., let me get his straight, it is normal that all my RAM is used, to the point where the screensaver won't even run correctly when activated, it runs at a crawl, stutters and jerks, and to the point where the system is noticeably slow? (all of which is cured by a reboot) Sorry, but I wasn't aware that this was normal behaviour. Perhaps the RAM isn't being free'd up, If while it is showing that most of the RAM is used, I try and start Quake3 or Quake4 for example, they will take at least 30 sec's to even start, I will just get a blank screen and have to just sit an wait, however, after a reboot, or at a time when all the RAM isn't shown as used, they will start instantly, surely this is not normal behaviour? Edited November 26, 2006 by jagwah Quote Link to comment Share on other sites More sharing options...
jagwah Posted November 26, 2006 Author Report Share Posted November 26, 2006 (edited) This is normal. This is not a bug, no problem here. The reason I brought this up is because there IS a problem, which is what lead me to look at the memory usage, I don't habitually go around checking how much memory is being used. I noticed noticeable performance degradation, looked, and seen the RAM thing, so I just thought that may be the/a problem. The only time I get the problem happens to coincide with the Memory being shown as practically all used, and a small amount of swap being used. I can play Quake3, Quake4, Doom3, etc all day long, without any problems, but as soon as I do something like Download large files (one thing that I have noticed will do it every time), the used RAM skyrockets, and I get the problem, There IS a problem here, it may not be what I am thinking as you say, but there surely is one. Edited November 26, 2006 by jagwah Quote Link to comment Share on other sites More sharing options...
iphitus Posted November 26, 2006 Report Share Posted November 26, 2006 (edited) Sorry, I didn't see your first post, but..., let me get his straight, it is normal that all my RAM is used, to the point where the screensaver won't even run correctly when activated, it runs at a crawl, stutters and jerks, and to the point where the system is noticeably slow? (all of which is cured by a reboot) Sorry, but I wasn't aware that this was normal behaviour. ah. you didnt describe this. now we're getting somewhere. generally that sort of situation is caused by, a - an application burning ram, causing the system to oom. b - something is causing load on the system. In your case, it's probably b. a is unlikely because the kernel kills apps that use all remaining ram. What are you doing that can induce this behaviour? Is this reproducible? Downloading large files... shouldnt do that. Does it happen after the download or during? James Edited November 26, 2006 by iphitus Quote Link to comment Share on other sites More sharing options...
jagwah Posted November 26, 2006 Author Report Share Posted November 26, 2006 (edited) If I download a file, the used memory will start to rise, (it seems to rise fairly constantly, at about 10000KB a minute) and will continue to as long as the download continues, or all the ram is used. If I stop the download, the rise in used ram will stop, if the download is a large one it will continue to rise up to the point where a small amount of swap gets used. On a 700MB download it will usually get up to about 1.5GB used, on the likes of the Mandriva Powerpack, 4.3GB, it's all gone(almost) and a small amount off swap is used. Once the download is finished there is no real drop in amount of ram used, it stays maxed out until rebooted. It is repeatable every time with a large download. I have done it 5 times over the last couple of days, and every time it happens. Is there a way to flush/clear the ram without the need to reboot? Edited November 26, 2006 by jagwah Quote Link to comment Share on other sites More sharing options...
iphitus Posted November 26, 2006 Report Share Posted November 26, 2006 when do the apparent slowdowns occur? increasingly as the file is downloaded? or all at once at the end? what are you downloading with? James Quote Link to comment Share on other sites More sharing options...
jagwah Posted November 26, 2006 Author Report Share Posted November 26, 2006 Well yeah, it sought of occurs increasingly as the download progresses, although you may not really notice it to bad until a big chunck/most of the ram is used. I tend not to do much whilst downloading, I prefer to let it do it's thing, and use another PC if I need to do something else. I just use Firefox to download, nothing special. I tried doing it through konqueror and it's the same. I'm on my other PC now, and just checking it again with a download, but the same happens here to. :sad: Quote Link to comment Share on other sites More sharing options...
scarecrow Posted November 26, 2006 Report Share Posted November 26, 2006 (edited) I'm sorry, but what you posted after running "top" is just the header, which does not provide ANY useful info. Right after the chunk you copypasted there's a big array of apps and processes, with details about their RAM usage. I mainly needed to look that list to see what's going wrong- but since you cannot copypaste it, nevermind... either resolve it yourself, or maybe someone else, more clever than me, can look after it. Edited November 26, 2006 by scarecrow Quote Link to comment Share on other sites More sharing options...
arctic Posted November 26, 2006 Report Share Posted November 26, 2006 Oh, it can be copypasted. Just run top, watch when the app that eats up your RAM appears, press ctrl+c, copy and paste the contents with your mouse. Then we can look into it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.