You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2017/07/31 22:46:13 UTC
[2/5] mesos git commit: Added protobuf scheme for blkio subsystem in
CgroupInfo.
Added protobuf scheme for blkio subsystem in CgroupInfo.
Only statistics information for blkio in protobuf.
Review: https://reviews.apache.org/r/60932/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9ed68402
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9ed68402
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9ed68402
Branch: refs/heads/master
Commit: 9ed68402988502d29eb6a510a3686def2bfd451b
Parents: 03b77fb
Author: Gilbert Song <so...@gmail.com>
Authored: Mon Jul 31 15:45:33 2017 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Mon Jul 31 15:45:33 2017 -0700
----------------------------------------------------------------------
include/mesos/mesos.proto | 68 +++++++++++++++++++++++++++++++++++++++
include/mesos/v1/mesos.proto | 68 +++++++++++++++++++++++++++++++++++++++
2 files changed, 136 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9ed68402/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 45253a3..f31f5bd 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -1584,6 +1584,9 @@ message ResourceStatistics {
// Per disk (resource) statistics.
repeated DiskStatistics disk_statistics = 43;
+ // Cgroups blkio statistics.
+ optional CgroupInfo.Blkio.Statistics blkio_statistics = 44;
+
// Perf statistics.
optional PerfStatistics perf = 13;
@@ -2901,6 +2904,71 @@ message ContainerStatus {
* Linux control group (cgroup) information.
*/
message CgroupInfo {
+ // Configuration of a blkio cgroup subsystem.
+ message Blkio {
+ enum Operation {
+ UNKNOWN = 0;
+ TOTAL = 1;
+ READ = 2;
+ WRITE = 3;
+ SYNC = 4;
+ ASYNC = 5;
+ }
+
+ // Describes a stat value without the device descriptor part.
+ message Value {
+ optional Operation op = 1; // Required.
+ optional uint64 value = 2; // Required.
+ }
+
+ message CFQ {
+ message Statistics {
+ // Stats are grouped by block devices. If `device` is not
+ // set, it represents `Total`.
+ optional Device.Number device = 1;
+ // blkio.sectors
+ optional uint64 sectors = 2;
+ // blkio.time
+ optional uint64 time = 3;
+ // blkio.io_serviced
+ repeated Value io_serviced = 4;
+ // blkio.io_service_bytes
+ repeated Value io_service_bytes = 5;
+ // blkio.io_service_time
+ repeated Value io_service_time = 6;
+ // blkio.io_wait_time
+ repeated Value io_wait_time = 7;
+ // blkio.io_merged
+ repeated Value io_merged = 8;
+ // blkio.io_queued
+ repeated Value io_queued = 9;
+ }
+
+ // TODO(jasonlai): Add fields for blkio weight and weight
+ // device.
+ }
+
+ message Throttling {
+ message Statistics {
+ // Stats are grouped by block devices. If `device` is not
+ // set, it represents `Total`.
+ optional Device.Number device = 1;
+ // blkio.throttle.io_serviced
+ repeated Value io_serviced = 2;
+ // blkio.throttle.io_service_bytes
+ repeated Value io_service_bytes = 3;
+ }
+
+ // TODO(jasonlai): Add fields for blkio.throttle.*_device.
+ }
+
+ message Statistics {
+ repeated CFQ.Statistics cfq = 1;
+ repeated CFQ.Statistics cfq_recursive = 2;
+ repeated Throttling.Statistics throttling = 3;
+ }
+ }
+
// Configuration of a net_cls cgroup subsystem.
message NetCls {
// The 32-bit classid consists of two parts, a 16 bit major handle
http://git-wip-us.apache.org/repos/asf/mesos/blob/9ed68402/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 4dfc8b0..66386a8 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -1567,6 +1567,9 @@ message ResourceStatistics {
// Per disk (resource) statistics.
repeated DiskStatistics disk_statistics = 43;
+ // Cgroups blkio statistics.
+ optional CgroupInfo.Blkio.Statistics blkio_statistics = 44;
+
// Perf statistics.
optional PerfStatistics perf = 13;
@@ -2884,6 +2887,71 @@ message ContainerStatus {
* Linux control group (cgroup) information.
*/
message CgroupInfo {
+ // Configuration of a blkio cgroup subsystem.
+ message Blkio {
+ enum Operation {
+ UNKNOWN = 0;
+ TOTAL = 1;
+ READ = 2;
+ WRITE = 3;
+ SYNC = 4;
+ ASYNC = 5;
+ }
+
+ // Describes a stat value without the device descriptor part.
+ message Value {
+ optional Operation op = 1; // Required.
+ optional uint64 value = 2; // Required.
+ }
+
+ message CFQ {
+ message Statistics {
+ // Stats are grouped by block devices. If `device` is not
+ // set, it represents `Total`.
+ optional Device.Number device = 1;
+ // blkio.sectors
+ optional uint64 sectors = 2;
+ // blkio.time
+ optional uint64 time = 3;
+ // blkio.io_serviced
+ repeated Value io_serviced = 4;
+ // blkio.io_service_bytes
+ repeated Value io_service_bytes = 5;
+ // blkio.io_service_time
+ repeated Value io_service_time = 6;
+ // blkio.io_wait_time
+ repeated Value io_wait_time = 7;
+ // blkio.io_merged
+ repeated Value io_merged = 8;
+ // blkio.io_queued
+ repeated Value io_queued = 9;
+ }
+
+ // TODO(jasonlai): Add fields for blkio weight and weight
+ // device.
+ }
+
+ message Throttling {
+ message Statistics {
+ // Stats are grouped by block devices. If `device` is not
+ // set, it represents `Total`.
+ optional Device.Number device = 1;
+ // blkio.throttle.io_serviced
+ repeated Value io_serviced = 2;
+ // blkio.throttle.io_service_bytes
+ repeated Value io_service_bytes = 3;
+ }
+
+ // TODO(jasonlai): Add fields for blkio.throttle.*_device.
+ }
+
+ message Statistics {
+ repeated CFQ.Statistics cfq = 1;
+ repeated CFQ.Statistics cfq_recursive = 2;
+ repeated Throttling.Statistics throttling = 3;
+ }
+ }
+
// Configuration of a net_cls cgroup subsystem.
message NetCls {
// The 32-bit classid consists of two parts, a 16 bit major handle