Skip to content

OboeTester_DynamicCpuLoad

Phil Burk edited this page Dec 7, 2023 · 1 revision

Using OboeTester to Test Dynamic CPU Load

Main OboeTester Docs

Overview

Audio use cases often have changing CPU workloads. An example is a music synthesizer that may be playing 0, 1 or dozens of notes at any given time! The CPU workload is proportional to the number of notes. When more notes are playing, the CPU frequency and voltage may be increased to handle the extra load. When fewer notes are playing, the CPU frequency and voltage may be decreased to save power improve battery life.

The increase in CPU frequency can sometimes take a long time, 100 msec. During this time the audio may be glitching.

OboeTester has a test called "CPU Load" that plays a tone with a workload that alternates between low and high levels. You can hear if the audio glitches. You can also see the measured CPU utilization.

How to Run

  1. Build OboeTester from GitHub
  2. Launch OboeTester
  3. Tap "Extras..."
  4. Tap "CPU LOAD"
  5. Tap "START"

Select the CPU affinity using the checkboxes.

Change the "high" workload using the "Workload" slider. The units are the number of analog synthesizer voices being calculated. The synth voice architecture was copied from SynthMark.

Check the ADPF box to enable the Android Dynamic Performance Framework. This can be enabled in Oboe apps using stream->setPerformanceHintEnabled().

The "cores" display shows which CPU cores were recently used to run the audio workload.

Screenshot

Dynamic CPU Load screenshot showing changing workload and CPU utilization