Add cpu consumption and other metrics to autotests, for use during wifi_perf |
||||
Issue descriptionOS: M57 The throughput numbers from wifi_perf leave us with more questions than answers - rx is lower than tx on Intel, but higher on some ARM platforms. Per past discussions, it would be good to simultaneously capture cpu (memory too?) stats during wifi_perf tests to check for system anomalies. Please comment on the below: - There is the existing performance_Tracker.py that rohitbm@ wrote. Augmenting/replacing it is one option. Issues - likely doesn't run multithreaded (it was intended to run stand-alone while the user tinkered with the device manually), doesn't use psutil that would make it nicer. - I'd like to write something similar to netperf_session.py / netperf_runner.py - the class abstracts all details of capturing data akin to these files, the users of the class (akin to wifi_perf tests) just call it with start, stop and what to capture.
,
Aug 14 2017
,
Jan 3 2018
,
Jun 27 2018
,
Jun 27 2018
,
Jun 27 2018
IIRC, we never settled on what we wanted to add in the netperf tests. satyat@ merged this CL, then Harpreet (or someone else) pointed out that autotest already has similar functionality. They were probably pointing to get_cpu_usage() function in client/bin/utils.py. Will let Alex make the call on which works best for us.
,
Jul 22
I vaguely recall Alex using a netperf command line option to get CPU utilization stats. Alex, reading through the CPU utilization part in the netperf manual (https://hewlettpackard.github.io/netperf/doc/netperf.html#CPU-Utilization) I am not sure if there's a reliable way to get this, or if we build netperf with that option enabled in --configure. "The /proc/stat mechanism under Linux is in what the author would consider an “uncertain” category as it appears to be statistical, which may also have issues with time spent processing interrupts. In summary, be sure to “sanity-check” the CPU utilization figures with other mechanisms. However, platform tools such as top, vmstat or mpstat are often based on the same mechanisms used by netperf." If you do go through this route, please double-check utilization numbers with "turbostat --quiet" output.
,
Jul 23
If netperf is run with the '-cC' options, we can get both server and client-side CPU utilization. Unfortunately, netperf only provides a single percentage per machine, which doesn't offer much insight when a system has 4 cores. My solution was to simply get the /proc/stat values of the machines through autotest right before and after running netperf, such that we could calculate the utilization values of each core separately. Although it seemed like netperf could provide more accurate numbers, as it collects the initial /proc/stat values after initialization, the difference on average between the two methods was less than a percentage point. That being said, I will play around with different methods and see the discrepancies between values. |
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Aug 11 2017