Search

Where's the Memory?

0 views

I had happened across RedHat and SUSE have substantially different algorithms when it comes to allocating cache memory. Where SUSE is very aggressive and tries to make full use of the available memory, RedHat leaves unused memory lying around in case it's suddenly needed by something. So if you've "learned" that Linux uses available memory for buffer caching, a RedHat system that doesn't could confuse you. But wait - that's not all. "Swappiness" was introduced in 2.6 kernels. When some program wants more ram and the kernel has a bunch being used for caching, it could give up some of that. Or it could just make some other less active program swap out to disk. Which is a better idea? Well, of course that depends on what is going on right now. If there is heavy disk activity and programs that really aren't being used, it would make sense to swap. If there isn't much disk activity, or those swappable programs are apt to become active very soon, it makes sense to give back memory. The idea was that the admin knows best what his system might require, so the admin should be able to say how much "swappiness" is desirable. If swappiness was set to zero (echo 0 >/proc/sys/vm/swappiness), the kernel would give up cache to anything that wanted ram; if it were set to 100 it would do the opposite and let the processes swap. Well, great, but what if you don't have a clue because sometimes your system has unused apps and sometimes it doesn't.? No problem, somebody came up with something that would make a good guess on the fly: But then: ( APLawrence.com A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

Suggest a Correction

Found an error or have a suggestion? Let us know and we'll review it.

Share this article

Comments (0)

Please sign in to leave a comment.

No comments yet. Be the first to comment!