You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2017/03/14 00:06:41 UTC
[jira] [Assigned] (MESOS-7237) Enabling cgroups_limit_swap can lead
to "invalid argument" error.
[ https://issues.apache.org/jira/browse/MESOS-7237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jie Yu reassigned MESOS-7237:
-----------------------------
Assignee: Jie Yu
> Enabling cgroups_limit_swap can lead to "invalid argument" error.
> -----------------------------------------------------------------
>
> Key: MESOS-7237
> URL: https://issues.apache.org/jira/browse/MESOS-7237
> Project: Mesos
> Issue Type: Bug
> Affects Versions: 1.0.2, 1.1.0, 1.2.0
> Environment: CentOS 7.
> Reporter: Jie Yu
> Assignee: Jie Yu
> Priority: Critical
>
> This is related to MESOS-2128. Looks like the redhat doc linked in that ticket is not accurate. `memory.limit_in_bytes` has to be less than or equal to `memory.memsw.limit_in_bytes`. Otherwise, the kernel is gonna throw EINVAL. Here is the validation with a box that has swap disabled:
> {noformat}
> [root@ip-10-10-0-120 test]# pwd
> /sys/fs/cgroup/memory/test
> [root@ip-10-10-0-120 test]# sleep 1000000 &
> [1] 23121
> [root@ip-10-10-0-120 test]# echo 23121 > tasks
> [root@ip-10-10-0-120 test]# cat tasks
> 23121
> [root@ip-10-10-0-120 test]# cat memory.limit_in_bytes
> 9223372036854771712
> [root@ip-10-10-0-120 test]# cat memory.memsw.limit_in_bytes
> 9223372036854771712
> [root@ip-10-10-0-120 test]# echo 3000000 > memory.limit_in_bytes
> [root@ip-10-10-0-120 test]# echo 3000000 > memory.memsw.limit_in_bytes
> [root@ip-10-10-0-120 test]# echo 100000000 > memory.limit_in_bytes
> bash: echo: write error: Invalid argument
> [root@ip-10-10-0-120 test]# cat /proc/swaps
> Filename Type Size Used Priority
> {noformat}
> {noformat}
> [root@ip-10-10-0-120 test]# sleep 100000 &
> [1] 31363
> [root@ip-10-10-0-120 test]# echo 31363 > tasks
> [root@ip-10-10-0-120 test]# echo 3000000 > memory.memsw.limit_in_bytes
> bash: echo: write error: Invalid argument
> [root@ip-10-10-0-120 test]# echo 3000000 > memory.limit_in_bytes
> [root@ip-10-10-0-120 test]# echo 3000000 > memory.memsw.limit_in_bytes
> [root@ip-10-10-0-120 test]# echo 100000000 > memory.memsw.limit_in_bytes
> [root@ip-10-10-0-120 test]# echo 100000000 > memory.limit_in_bytes
> [root@ip-10-10-0-120 test]# cat memory.limit_in_bytes
> 99999744
> [root@ip-10-10-0-120 test]# cat memory.memsw.limit_in_bytes
> 99999744
> {noformat}
> Related Docker issue: https://github.com/docker/docker/pull/25461
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)