Disable cpu load tracking temporarily.

I'd like to understand its resource usage and improve accuracy
before we ship it in an official release.
This commit is contained in:
Rohit Jnagal 2015-02-09 06:25:15 +00:00 committed by Victor Marmol
parent 58f3cd48d5
commit 52d4be1f9e
3 changed files with 19 additions and 15 deletions

View File

@ -125,22 +125,25 @@ type manager struct {
// Start the container manager. // Start the container manager.
func (self *manager) Start() error { func (self *manager) Start() error {
// Create cpu load reader. // TODO(rjnagal): Skip creating cpu load reader while we improve resource usage and accuracy.
cpuLoadReader, err := cpuload.New() if false {
if err != nil { // Create cpu load reader.
// TODO(rjnagal): Promote to warning once we support cpu load inside namespaces. cpuLoadReader, err := cpuload.New()
glog.Infof("Could not initialize cpu load reader: %s", err)
} else {
err = cpuLoadReader.Start()
if err != nil { if err != nil {
glog.Warning("Could not start cpu load stat collector: %s", err) // TODO(rjnagal): Promote to warning once we support cpu load inside namespaces.
glog.Infof("Could not initialize cpu load reader: %s", err)
} else { } else {
self.loadReader = cpuLoadReader err = cpuLoadReader.Start()
if err != nil {
glog.Warning("Could not start cpu load stat collector: %s", err)
} else {
self.loadReader = cpuLoadReader
}
} }
} }
// Create root and then recover all containers. // Create root and then recover all containers.
err = self.createContainer("/") err := self.createContainer("/")
if err != nil { if err != nil {
return err return err
} }

View File

@ -116,8 +116,8 @@ const containersHtmlTemplate = `
<div class="panel-body"> <div class="panel-body">
<h4>Total Usage</h4> <h4>Total Usage</h4>
<div id="cpu-total-usage-chart"></div> <div id="cpu-total-usage-chart"></div>
<h4>CPU Load Average</h4> <!-- <h4>CPU Load Average</h4>
<div id="cpu-load-chart"></div> <div id="cpu-load-chart"></div> -->
<h4>Usage per Core</h4> <h4>Usage per Core</h4>
<div id="cpu-per-core-usage-chart"></div> <div id="cpu-per-core-usage-chart"></div>
<h4>Usage Breakdown</h4> <h4>Usage Breakdown</h4>

View File

@ -1851,9 +1851,10 @@ function drawCharts(machineInfo, containerInfo) {
steps.push(function() { steps.push(function() {
drawCpuTotalUsage("cpu-total-usage-chart", machineInfo, containerInfo); drawCpuTotalUsage("cpu-total-usage-chart", machineInfo, containerInfo);
}); });
steps.push(function() { // TODO(rjnagal): Re-enable CPU Load after understanding resource usage.
drawCpuLoad("cpu-load-chart", machineInfo, containerInfo); // steps.push(function() {
}); // drawCpuLoad("cpu-load-chart", machineInfo, containerInfo);
// });
steps.push(function() { steps.push(function() {
drawCpuPerCoreUsage("cpu-per-core-usage-chart", machineInfo, containerInfo); drawCpuPerCoreUsage("cpu-per-core-usage-chart", machineInfo, containerInfo);
}); });