Re: Cannot set memory.memsw.limit_in_bytes for a particular cgroup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kame,


On Apr 24, 2012, at 8:27 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> (2012/04/25 10:00), Andrew Martin wrote:
>
>
>>> Then, Does "echo > ...apache/memory.memsw.limit_in_bytes" works fine ?
>>> If so, kernel works fine.
>>>
>> It appears to work, in that if I cat it after doing so the new value is retained. However, I have not pushed apache hard enough after doing it to see if the limit is really enforced, though I agree it looks like it is being set correctly using this method.
>>
>>> I'm sorry I'm not libcgroup specialist..but..What happens when you write
>>>>       memory {
>>>>               memory.limit_in_bytes = 6000M;
>>>>               memory.memsw.limit_in_bytes = 6000M;
>>>>               memory.swappiness = 5;
>>>>       }
>>>
>> I also tried that as well as specifying the bytes directly, with no improvement. I also tried different values for memory.memsw.limit_in_bytes from 6000 to 6256 in both powers of 2 and 10.
>>
>> Any other ideas?
>>
>
> ok, I doubt memory.memsw.limit_in_bytes is set before memory.limit_in_bytes...
> i.e. maybe libcgroup sets values in reverse order.
>
> How about this ?
>
> memory {
>    memory.memsw.limit_in_bytes = 6G;
>    memory.limit_in_bytes = 6G;
>    memory.swappiness = 5;
> }
>
>
> memory.limit_in_bytes should be less than memory.memsw.limit_in_bytes.
>
> Thanks,
> -Kame
>
>
That's a good idea, but this Red Hat documentation explains that
memory.limit_in_bytes must occur before memory.memsw.limit_in_bytes
because of how they are initialized:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html

I would prefer memory.memsw.limit_in_bytes to be maybe 5-10MB larger
than memory.limit_in_bytes.

Thanks,

Andrew
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux