Be careful, however, that you are accurately identifying "an actual
problem" when you observe that "<<such_and_such>> is 'consuming all available RAM capacity.'"
"Is anybody actually
screaming?" Are other processes being swapped-out, or forced into an involuntary page-wait state for a significant amount of time?
If you are simply observing that the physical-RAM resource is "100% utilized," then this is actually a
good thing. "That's what physical-RAM is
for," and Linux of course wants to put 100% of it to some productive use, 100% of the time.
Unless there is actual
pressure, or contention, for the physical-RAM resource, then Linux will be "utterly
lazy" concerning it. The physical-RAM consumption of any process, in an "otherwise un-contested, 'life is good™,' situation," might be considerably overstated: even if the process hasn't referenced that data in several
hours, Linux will make no attempt whatsoever to "clean it up." Until it feels "pressured" to do so. This is by design.
- - - - -
One of my past-life employers would very-periodically run a process that would query the system's virtual-memory statistics, then allocate memory in a specific effort to cause "moderate perceived memory pressure." Basically, just enough to cause the OS to actually look for unused pages (in other processes) and "reap" them in order to satisfy the new demand. The process then terminated itself, so that its own allocation would be disposed-of and accounted-for as "free space." This process simply existed to cause the long-term system-utilization statistics (which the company religiously collected, for some reason) to be more accurate. On systems in which memory-pressure did not ordinarily exist, this process periodically
induced it.