process/system cpu_share implementation in python

Bug #1607568 reported by Santosh Gupta
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
High
Santosh Gupta
Trunk
Fix Committed
High
Santosh Gupta

Bug Description

Current method to get process/system cpu_share in python with interval=0.1s is not proper.
Should be along the lines of c++ implementation.
https://github.com/Juniper/contrail-controller/blob/73a3df6250e41807bb6dfb79c60a85ca9b156e33/src/base/cpuinfo.cc#L121

Santosh Gupta (sangupta)
Changed in juniperopenstack:
assignee: nobody → Santosh Gupta (sangupta)
importance: Undecided → High
status: New → In Progress
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22599
Submitter: Santosh Gupta (<email address hidden>)

information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22766
Submitter: Santosh Gupta (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/22766
Committed: http://github.org/Juniper/contrail-controller/commit/9b32dd0f9eeb56e9b2e12aa3221824ccca699b04
Submitter: Zuul
Branch: R3.1

commit 9b32dd0f9eeb56e9b2e12aa3221824ccca699b04
Author: Santosh Gupta <email address hidden>
Date: Thu Jul 28 17:22:54 2016 -0700

Fix process/system cpu_share implementation in python

Currently we get cpu_share for interval=0.1s
Averaging it over 60s now to avoid instant blips in CPU usage.

Change-Id: I1ffd96aa3e5cc62c436cbcedb565cc758818bf71
Closes-Bug:1607568

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/22599
Committed: http://github.org/Juniper/contrail-controller/commit/8c5cfbc72b041a5790cf3c7112c7295feb3bfb2c
Submitter: Zuul
Branch: master

commit 8c5cfbc72b041a5790cf3c7112c7295feb3bfb2c
Author: Santosh Gupta <email address hidden>
Date: Thu Jul 28 17:22:54 2016 -0700

Fix process/system cpu_share implementation in python

Currently we get cpu_share for interval=0.1s
Averaging it over 60s now to avoid instant blips in CPU usage.

Change-Id: I1ffd96aa3e5cc62c436cbcedb565cc758818bf71
Closes-Bug:1607568

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.