reducing RAM usage
I am using KDE atm ... 512MB RAM, 2GB swap
I want to know how to free up RAM and cache .... when I do a cold boot there is about 75-80MB of RAM ... after an hour of surfing the web I close my browser(firefox) and there is 200MBs ... I realize this is because it keeps stuff cached for easy access ... and perfectly normal but my problem I run into is I do Folding@Home with this PC and leave it on 24/7 and after about 2 weeks my swap file can grow to 1.5GBs:eek: ... and this has a big effect on performance since it has to search through that to get at files and images, etc So how do I remove temp internet files, cache, etc etc from the RAM? |
That sounds more like a mem leak then temp or cache files. What program is the one taking so much RAM?. Run "top" to find it out...
|
There are many tuning knobs for virtual memory control, but probably the most effective for your issue is the swappiness:
cat /proc/sys/vm/swappiness 60 By reducing this number, you reduce the system's tendency to swap (putting more pressure on the cache). Less information will be kept in cache (meaning increased I/O), but for your particular situation it might be effective. I suggest adding the following to /etc/rc.d/rc.local before a reboot: echo "20" > /proc/sys/vm/swappiness If the system remains more responsive over a longer interval, then it is working for you. |
Quote:
irt mace ... thnx I'll do that soon as I get back I have to step out a bit but isn't there a temp directory like windows(i know that's a bad word around here:p ) has? in which I could clear every week or so, as I fail to see the point of keeping all that internet and system clutter around |
Maybe use WM that's smaller than KDE. . ?
|
Yeah there is a /tmp directory but it is not mapped into /dev/shm by default so it shouldn't be taking up ram. The correct way to delete it is to switch into single user mode "init 1" and then it is safe to just rm everything there and then init 3 back into multi user mode.
You could also rm it in your shutdown script which is what I do, but since you never reboot just "init 1" and rm it. Also linux doesn't give back memory that applications use right away it will hold on to it for a while just in case you start up again. To get a true measure of how much ram you are using do a "free -m"... take the used and subtract the cache. Funny I only have 256 MB of ram and box almost never uses more than a MB or so of swap. And after 10 minutes or so when I'm doing do whatever mem intensive things it will drop back down to zero. You may have a mem link. what is f@h? |
Quote:
In any case, the contents of the /tmp directory and things like browser cache are disk files. They are not the cache that is being referred to in memory (RAM). |
Quote:
|
I think I'd have to echo Mace on this one.
First, the memory that's being used, that's honestly just cached things that aren't yet freed up. They don't get written to disk, and get reused at need, so no sweat there. Second, firefox does keep a cache that's much like the old "Temporary Internet Files" model - in ~/.mozilla/firefox directory, I think. |
Furlinastis I would try stop using your programs one at the time to see which one has a memory leak. I've two computers 24/7 both running F@H and never had a problem with them.
The swap is not used by temporary files but for programs to get more memory, so try not using ie: amsn for two weeks and see what you have. If you still have a swamp overload try not running another program, etc. chbin, F@H or Folding@Home a project similar to SETI@Home but for looking different things about proteins and related stuff. The homepage is: http://folding.stanford.edu/ |
Cleaning up /tmp (and /var/tmp) is safe as long as you don't delete recent tempfiles. I've had a script like this:
Code:
#!/bin/bash |
Quote:
|
Pat ships it pretty much unmodified. He only adds things that are absolutely essential to get it to boot. The odds and ends are up to you and you alone. Who knows maybe someone wants to keep it around... and doesn't want it deleted. Perhaps they use temp to compile and build source. Who knows.
|
I think one thing that might worth knowing, is what exactly are you running? Are you running current, 10.1 , or 10.0? Since, also there is a different KDE version in each
|
Quote:
bdflush block_dump kswapd laptop_mode max-readahead max_map_count min-readahead overcommit_memory page-cluster pagetable_cache vm_cache_scan_ratio vm_gfp_debug vm_mapped_ratio vm_passes vm_vfs_scan_ratio Quote:
logrotate slocate which file should I add that script to? or should I just create a new file? if so what should I name it? TIA:D (BTA I'm using 10.0) |
All times are GMT -5. The time now is 10:36 PM. |