sary
ok, let's consider a _miiddleware_ wchich has following paramater.
An expoterd param to the user.
- user_memory_limit
parameters for co-operation with the kernel
- kernel_memory_limit
And here,
user_memory_limit >= kernel_memory_limit == cgroup's memory.limits_in_bytes
When a user ask the miidleware to set limit to 1Gbytes
user_memory_limit = 1G
kernel_memory_limit = 0-1G.
It moves kernel_memory_limit dynamically 0 to 1Gbytes and reset limits_in_byte
s in dynamic way with checking memory cgroup's statistics.
Of course, we can add some kind of interdace , as following
- failure_notifier - triggered at failcnt increment.
- threshhold_notifier - triggered as usage > threshold.
aim
That's not problem because it's avoildable by users.
But it's ok to limit the sum of child's limit to be below XX % ot the parent.
As explained, this can be dynamic by middleware.
Yes, I read. And tried to make it faster and found it will be complicated.
One problem is overhead of counter itself.
Another problem is overhead of shrinking multi-level LRU with feedback.
One more problem is that it's hard to implement various kinds of hierarchy
policy. I believe there are other hierarhcy policies rather than OpenVZ
want to use. Kicking out functions to middleware AMAP is what I'm thinking
now.
Thanks,
-Kame
--