mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Song <songzihao1...@gmail.com>
Subject Re: Review Request 60934: Implemented blkio subsystem usage() for resource statistics.
Date Sun, 30 Jul 2017 00:00:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60934/
-----------------------------------------------------------

(Updated July 29, 2017, 5 p.m.)


Review request for mesos, haosdent huang, Jason Lai, Jie Yu, Qian Zhang, and Zhitao Li.


Bugs: MESOS-6162
    https://issues.apache.org/jira/browse/MESOS-6162


Repository: mesos


Description
-------

Implemented blkio subsystem usage() for resource statistics.


Diffs (updated)
-----

  src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.hpp a2c575cc87a9e08612cf417013dac76ad6de873b

  src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp 6be0f9ed4aa8c1a2273e5808ad54d3a4922c5e8d



Diff: https://reviews.apache.org/r/60934/diff/4/

Changes: https://reviews.apache.org/r/60934/diff/3-4/


Testing
-------

make check

Tested with `mesos-execute` and verified that the blkio statistics can be collected from the
resource statistics endpoint:

Start the master:
sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos

Start the agent:
sudo GLOG_v=1 ./bin/mesos-agent.sh --master=127.0.0.1:5050 --isolation=cgroups/blkio,docker/runtime,filesystem/linux
--work_dir=/tmp --image_providers=docker --executor_environment_variables="{}"

Launch `mesos-execute` test framework:
sudo ./src/mesos-execute --master=127.0.0.1:5050 --name=test --docker_image=alpine --shell=true
--command="while true ; do echo 'hello' > test.txt ; done"

Collect the statistics for blkio:
```
vagrant@vagrant-ubuntu-wily-64:~$ curl localhost:5051/monitor/statistics.json | python -m
json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1247  100  1247    0     0  39390      0 --:--:-- --:--:-- --:--:-- 40225
[
    {
        "executor_id": "test",
        "executor_name": "Command Executor (Task: test) (Command: sh -c 'while true ;...')",
        "framework_id": "39fb6d5c-d5bd-4b18-a632-0a42e417b946-0000",
        "source": "test",
        "statistics": {
            "blkio": {
                "cfq": [
                    {
                        "io_merged": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_queued": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_service_bytes": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_service_time": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_serviced": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_wait_time": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ]
                    }
                ],
                "cfq_recursive": [
                    {
                        "io_merged": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_queued": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_service_bytes": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_service_time": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_serviced": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ],
                        "io_wait_time": [
                            {
                                "op": "TOTAL",
                                "value": 0
                            }
                        ]
                    }
                ],
                "throttling": [
                    {
                        "device": {
                            "major": 8,
                            "minor": 0
                        },
                        "io_service_bytes": [
                            {
                                "op": "READ",
                                "value": 0
                            },
                            {
                                "op": "WRITE",
                                "value": 4096
                            },
                            {
                                "op": "SYNC",
                                "value": 0
                            },
                            {
                                "op": "ASYNC",
                                "value": 4096
                            },
                            {
                                "op": "TOTAL",
                                "value": 4096
                            }
                        ],
                        "io_serviced": [
                            {
                                "op": "READ",
                                "value": 0
                            },
                            {
                                "op": "WRITE",
                                "value": 1
                            },
                            {
                                "op": "SYNC",
                                "value": 0
                            },
                            {
                                "op": "ASYNC",
                                "value": 1
                            },
                            {
                                "op": "TOTAL",
                                "value": 1
                            }
                        ]
                    },
                    {
                        "io_service_bytes": [
                            {
                                "op": "TOTAL",
                                "value": 4096
                            }
                        ],
                        "io_serviced": [
                            {
                                "op": "TOTAL",
                                "value": 1
                            }
                        ]
                    }
                ]
            },
            "cpus_limit": 1.1,
            "mem_limit_bytes": 167772160,
            "timestamp": 1500335339.30187
        }
    }
]
```


Thanks,

Gilbert Song


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message