On Thu, Nov 03, 2005 at 08:23:20AM -0800, Badari Pulavarty wrote:
> Yep. This is the exactly the issue other product groups normally raise
> on Linux. How do we measure memory pressure in linux ? Some of our
> software products want to grow or shrink their memory usage depending
> on the memory pressure in the system.
I think this is wrong. Applications shouldn't be measuring host
memory pressure and trying to react to it.
This gives you no way to implement a global memory use policy - you
can't say "App X is the most important thing on the system and must
have all the memory it needs in order run as quickly as possible".
You can't establish any sort of priority between apps when it comes to
memory use, or change those priorities.
And how does this work when the system can change the amount of memory
that it has, such as when the app is inside a UML?
I think the right way to go is for willing apps to have an interface
through which they can be told "change your memory consumption by +-X"
and have a single daemon on the host tracking memory use and memory
pressure, and shuffling memory between the apps.
This allows the admin to set memory use priorities between the apps
and to exempt important ones from having memory pulled.
Measuring at the bottom and pushing memory pressure upwards also works
naturally for virtual machines and the apps running inside them. The
host will push memory pressure at the virtual machines, which in turn
will push that pressure at their apps.
With UML, I have an interface where a daemon on the host can add or
remove memory from an instance. I think the apps that are willing to
adjust should implement something similar.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]