View previous topic :: View next topic |
Author |
Message |
dritan Apprentice
Joined: 01 Feb 2006 Posts: 210 Location: New York
|
Posted: Tue May 01, 2007 2:10 pm Post subject: Clearing Cached Memory |
|
|
hey guys,
i just got a new laptop and it works like a charm, there is only 1 small problem, after using the system for a while, especially if i emerge something, the cached memory will be full (the light green part on the memory of gnome-system-monitor) and all my apps run very slow, it disappears when i reboot but i dont want to reboot all the time, so how can i clear it, or say limit how much to use?
Thanks _________________ Regards,
Dritan
Please try to help answer the unanswered |
|
Back to top |
|
|
Angry_Red_Antz Tux's lil' helper
Joined: 31 Mar 2005 Posts: 103 Location: Pittsfield, Massachusetts, But 100% Boricua
|
Posted: Tue May 01, 2007 2:37 pm Post subject: |
|
|
you can do this:
echo 1 > /proc/sys/vm/drop_caches #To free pagecache
echo 2 > /proc/sys/vm/drop_caches #To free dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches # to do both _________________ Show me the Linux! |
|
Back to top |
|
|
dritan Apprentice
Joined: 01 Feb 2006 Posts: 210 Location: New York
|
Posted: Tue May 01, 2007 3:05 pm Post subject: |
|
|
wow! worked miracle!
now i'll make it into a little script and cron it!
thanks a bunch!! _________________ Regards,
Dritan
Please try to help answer the unanswered |
|
Back to top |
|
|
phajdan.jr Retired Dev
Joined: 23 Mar 2006 Posts: 1777 Location: Poland
|
Posted: Tue May 01, 2007 5:48 pm Post subject: |
|
|
I wouldn't say that it's a good solution, because you may now waste cache. Options mentioned above were introduced mainly to allow to perform benchmark from the same state (nothing cached).
As far as I understand your problem, emerge puts many files into cache, and your applications get swapped out. You can try the swap prefetch patch from ck-sources. It brings swapped out pages back to RAM when the system is idle. So in theory after your emerge ends, it should automatically de-swap apps and not needlessly waste cache.
If you would like however to take approach proposed in the previous post - nothing bad, okay. But don't put it in the cron script, just run it after emerge to bring system back to usable state. Running it too often will actually make your system run slower, because of wasted cache. |
|
Back to top |
|
|
dritan Apprentice
Joined: 01 Feb 2006 Posts: 210 Location: New York
|
Posted: Wed May 02, 2007 10:46 am Post subject: |
|
|
i see...i guess i will give ck a try then, nothing harmful anyways...i just have one little question, how can i find out which packages are compiled against my kernel? i know my ipw3945 is, but i am sure there are more...is there any way to find out? _________________ Regards,
Dritan
Please try to help answer the unanswered |
|
Back to top |
|
|
phajdan.jr Retired Dev
Joined: 23 Mar 2006 Posts: 1777 Location: Poland
|
Posted: Wed May 02, 2007 11:38 am Post subject: |
|
|
dritan wrote: | i see...i guess i will give ck a try then, nothing harmful anyways...i just have one little question, how can i find out which packages are compiled against my kernel? i know my ipw3945 is, but i am sure there are more...is there any way to find out? |
module-rebuild (emerge module-rebuild if you don't have it). Included help should tell you how to use it. |
|
Back to top |
|
|
dritan Apprentice
Joined: 01 Feb 2006 Posts: 210 Location: New York
|
Posted: Wed May 02, 2007 7:19 pm Post subject: |
|
|
thanks alot,
didnt know that there was a little handy tool like that! your help is much appreciated _________________ Regards,
Dritan
Please try to help answer the unanswered |
|
Back to top |
|
|
|