Create a way to simulate mobile workload that scheduler developers can test against

Registered by Amit Kucheria

Scheduler developers need an easy way to simulate various workloads they need to tune for. Currently there is no mobile workload that they have access too. The goal is to create such a representative workload for common mobile usecases. Several of them are expected to be common to desktop usecases e.g. web browsing, background email download, instant messaging server keepalives, etc. Other use cases might include an audio/video encoding and even a 3D game.

One requirement is that the workload be simulated through a C program, shell script, etc. An Android UI should not be required, for example.

For the better tuning of the scheduler internals, a precise scheduler-specific test and benchmark tool would be also desirable. Such a tool might include the test cases and benchmarks for the process/thread creation/termination, pipe throughput measurement, multi-threaded contention for a mutex, interaction between threads/processes with a different scheduling policy and/or priority, etc. An important internal statistics may be accessed by using delay accounting (as described in Documentation/accounting/delay-accounting.txt from the kernel source tree) or via /proc/[PID]/schedstat interface.

Details about scheduler discussions are at: https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/HMPscheduling

Blueprint information

Status:
Complete
Approver:
Amit Kucheria
Priority:
Medium
Drafter:
Dmitry Antipov
Direction:
Approved
Assignee:
Dmitry Antipov
Definition:
Superseded
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2012.06
Started by
Amit Kucheria
Completed by
Amit Kucheria

Related branches

Sprints

Whiteboard

[dzin Aug 9, 2012] Superseded by https://blueprints.launchpad.net/linaro-power-kernel/+spec/perf-record-replay

Meta:
Headline: TBD
Acceptance: TBD
Roadmap id: PMWG2011-MULTI-CORE-SCHEDULING

An adequate simulation of browsing workload may be a challenging task. Even a simple browsing simulation implies parallel HTTP downloads, parsing, image rendering, JavaScript execution, and so. More advanced simulation might include audio/video playback, HTTPS, interaction with social networks... Ideally, there should be a special "headless" (no GUI or smallest possible GUI), but full-featured, and script-driven browser which allows full automation of emulated user interface. There is at least one project tries to meet these requirements, see http://htmlunit.sourceforge.net. Unfortunately, it's targeted to automated web application testing (i.e. when a server-side code needs to be tested under massive parallel workload) rather than client-side browsing experience. And it's written in Java, thus making client-side workload different from real browsers, which are mostly written in lower-level languages like C and C++.

This blueprint will try to describe some possible approaches to meet the requirements from the above, and the most perspective one is to utilize WebKit (http://www.webkit.org) framework. WebKit is used for real mobile browsers already (on iOS, Android, webOS, Bada), so it's expected that the workload created by WebKit-aware test application will be a good emulation of a real workload. WebKit is full-featured, thus capable to utilize an advanced features listed above. On the other side, WebKit may be deployed in a limited configuration with some features disabled at compile time, thus eliminating the dependencies from high-level parts of UI stack and multimedia libraries. Finally, WebKit distribution includes some good examples, including very simple browser, and such an examples might be a good starting point to create a good mobile workload emulation.

Now there is an automated (requires no user interaction) Wikipedia browsing test application, hosted at http://git.linaro.org/gitweb?p=people/antipov/testbrowser.git;a=summary. It must be natively compiled on any supported hardware after installing WebKit development files with "apt-get install libwebkitgtk-dev" on top of linaro-o-developer file system. This test application also works with off-screen mode if -offscreen command line option is specified.

Multimedia workload simulation (audio/video decoding) is a simpler task because this process initially implies a little or even no user interaction at all. There is a good opportunity to use ffmpeg command-line tool from http://www.ffmpeg.org project after extending it with some kind of time- and CPU-statistics gathering features.

For the scheduler-specific test and benchmark tool, different approaches from SysBench (http://sourceforge.net/projects/sysbench), LMBench (http://www.bitmover.com/lmbench), UnixBench (http://code.google.com/p/byte-unixbench) and other similar projects may be used, with some modifications to obtain scheduler statistics via interfaces exists in latest kernel versions.

(?)

Work Items

Work items for 2012.03:
[dmitry.antipov] Use a basic web browsing usecase to simulate using C/shell program: DONE

Work items for 2012.04:
[dmitry.antipov] Figure out a way to record/playback process data - context switches, interrupts: DONE
[dmitry.antipov] Investigate perf record to capture data related to running process: DONE

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.