Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-7171

Mesos Containerizer Change Size of SHM

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      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.

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

      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:

      {
        "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": {}
          }
        ]
      }
      

      Modified Parameter Container:

      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
      

      Standard Container:

      {
        "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": {}
          }
        ]
      }
      

      Standard Container:

      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
      

      How can this be done on mesos containerizer?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bernadinm Miguel Bernadin
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: