You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Miguel Bernadin (JIRA)" <ji...@apache.org> on 2017/02/24 21:51:44 UTC

[jira] [Created] (MESOS-7171) Mesos Containerizer Change Size of SHM

Miguel Bernadin created MESOS-7171:
--------------------------------------

             Summary: Mesos Containerizer Change Size of SHM
                 Key: MESOS-7171
                 URL: https://issues.apache.org/jira/browse/MESOS-7171
             Project: Mesos
          Issue Type: Improvement
            Reporter: Miguel Bernadin
            Priority: Minor


like the ability to adjust the size of the shared memory device just like this can be performed on docker.
For example: To be able to change this on docker you can specify how much space you would like to allocate as a parameter in the app definition in marathon.

{code}
      "parameters": [
        {
          "key": "shm-size",
          "value": "256mb"
        }
{code}

As you can see below, here is an example of a container running and how much space is available on disk reflecting this change.
Modified Parameter Container:
{code}
{
  "id": "/ubuntu-withshm",
  "cmd": "sleep 10000000\n",
  "cpus": 1,
  "mem": 128,
  "disk": 0,
  "instances": 1,
  "container": {
    "type": "DOCKER",
    "volumes": [],
    "docker": {
      "image": "ubuntu",
      "network": "HOST",
      "privileged": false,
      "parameters": [
        {
          "key": "shm-size",
          "value": "256mb"
        }
      ],
      "forcePullImage": false
    }
  },
  "portDefinitions": [
    {
      "port": 10005,
      "protocol": "tcp",
      "labels": {}
    }
  ]
}
{code}

Modified Parameter Container:
{code}
core@ip-10-0-0-19 ~ $ docker exec -it a818cf2277a5 bash
root@ip-10-0-0-19:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          37G  2.0G   33G   6% /
tmpfs           7.4G     0  7.4G   0% /dev
tmpfs           7.4G     0  7.4G   0% /sys/fs/cgroup
/dev/xvdb        37G  2.0G   33G   6% /etc/hostname
shm             256M     0  256M   0% /dev/shm
{code}
Standard Container:
{code}
{
  "id": "/ubuntu-withoutshm",
  "cmd": "sleep 100000000",
  "cpus": 1,
  "mem": 128,
  "disk": 0,
  "instances": 1,
  "container": {
    "type": "DOCKER",
    "volumes": [],
    "docker": {
      "image": "ubuntu",
      "network": "HOST",
      "privileged": false,
      "parameters": [],
      "forcePullImage": false
    }
  },
  "portDefinitions": [
    {
      "port": 10006,
      "protocol": "tcp",
      "labels": {}
    }
  ]
}
{code}
Standard Container:
{code}
root@ip-10-0-0-19:/# exit
exit
core@ip-10-0-0-19 ~ $ docker exec -it c85433062e78 bash
root@ip-10-0-0-19:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          37G  2.0G   33G   6% /
tmpfs           7.4G     0  7.4G   0% /dev
tmpfs           7.4G     0  7.4G   0% /sys/fs/cgroup
/dev/xvdb        37G  2.0G   33G   6% /etc/hostname
shm              64M     0   64M   0% /dev/shm
{code}

How can this be done on mesos containerizer?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)