Interview questions: mobile device power consumption


The mobile device consumes more power that you've expected. Please, create the list of actions how to find and to debug the root cause of this issue. What tools/equipment do you need?


Bug / Misconfiguration

If it is a bug in the system (deadlock, infinite loop, crashing/restarting a user-space application, wake locks) then we can use standard system debugging facilities to find the cause. In kernel case, we need to rebuild the kernel with debug information, self-checking configuration options and try to reproduce the bug, attach the debugger/dynamic instrumentation tool. In the case of userspace application, we should use top/system journal/iotop/wake locks detector/systemtap analogs to find the buggy application and attach the debugger to the running process or fix the configuration.

Bad design

If it isn't a bug then we should use a special profiler. Instruments:

  • system-level profiler (we need to know what code is the most "heavyweight" regarding the power consumption);
  • test suites for mobile device subsystems (CPU tests, disk io tests, network subsystem, GPU, sensors ...) for the profiler calibration.

Standard profilers measure the time spent on function/instruction execution. Instead of timescale, we should consider power scale. First, we need to calibrate our profiler to get the right "weights" for different instructions. After calibration step, we could estimate a system/an application for the power consumption level and find the code that consumes the most.


comments powered by Disqus