{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "YouTube per-CPU CGroup residency analysis (with eas 1.3)\n", "=======================\n", "This is a run of the eas 1.3 branch from common on a wahoo device, with the following patches:\n", "```\n", "-rw-r----- 1 joelaf eng 11772 Jul 21 12:24 0001-sched-fair-streamline-find_best_target-heuristics.patch\n", "-rw-r----- 1 joelaf eng 2962 Jul 21 12:24 0002-events-add-tracepoint-for-find_best_target.patch\n", "-rw-r----- 1 joelaf eng 3307 Jul 21 12:24 0003-sched-fair-Update-signals-of-nohz-cpus-if-we-are-goi.patch\n", "-rw-r----- 1 joelaf eng 1441 Jul 21 12:24 0004-sched-fair-kick-nohz-idle-balance-for-misfit-task.patch\n", "-rw-r----- 1 joelaf eng 1424 Jul 21 12:24 0005-Revert-sched-fair-ensure-utilization-signals-are-syn.patch\n", "-rw-r----- 1 joelaf eng 1478 Jul 21 12:24 0006-sched-fair-Sync-task-util-before-EAS-wakeup.patch\n", "-rw-r----- 1 joelaf eng 3889 Jul 21 12:24 0007-sched-fair-Try-to-estimate-possible-idle-states.patch\n", "-rw-r----- 1 joelaf eng 3563 Jul 21 12:24 0008-sched-fair-Add-a-backup_cpu-to-find_best_target.patch\n", "```\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "#!/usr/bin/env python\n", "%pylab inline\n", "import trappy\n", "from trace import Trace\n", "import logging\n", "import pandas as pd\n", "import numpy as np\n", "import os\n", "\n", "from conf import LisaLogging\n", "LisaLogging.setup(level=logging.ERROR)\n", "logging.info('#### Setup FTrace')/home/joelaf/repo/lisa-aosp/external/lisa/results/YouTube_eas13_prefidle2_4.4.56-g931b784e1a3f-29958-gbabcada7d03d/trace.html\n", "path_to_html = \"/home/joelaf/repo/lisa-aosp/external/lisa/results/YouTube_eas13_4.4.56-g931b784e1a3f-29955-gb23d9461001d/trace.html\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "tr = Trace(None, path_to_html,\n", " cgroup_info = { \n", " 'cgroups': ['foreground', 'background', 'system-background', 'top-app', 'rt'],\n", " 'controller_ids': { 4: 'cpuset', 2: 'schedtune' }\n", " },\n", " events=[ 'sched_switch', 'cgroup_attach_task_devlib', 'cgroup_attach_task', 'sched_process_fork' ],\n", " normalize_time=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Total amount of time spent per Cgroup (schedtune)\n", "===========================\n", "(NaN is the idle task)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | cpu_0 | \n", "cpu_1 | \n", "cpu_2 | \n", "cpu_3 | \n", "cpu_4 | \n", "cpu_5 | \n", "cpu_6 | \n", "cpu_7 | \n", "total | \n", "
---|---|---|---|---|---|---|---|---|---|
schedtune | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
background | \n", "0.181796 | \n", "0.093132 | \n", "0.035834 | \n", "0.035993 | \n", "0.000000 | \n", "0.000000 | \n", "0.248871 | \n", "0.033227 | \n", "0.628853 | \n", "
foreground | \n", "3.275281 | \n", "2.490945 | \n", "1.072858 | \n", "0.795708 | \n", "0.404360 | \n", "0.082993 | \n", "2.103421 | \n", "2.119096 | \n", "12.344662 | \n", "
root | \n", "4.910663 | \n", "3.239125 | \n", "3.660462 | \n", "3.066602 | \n", "0.340190 | \n", "0.194053 | \n", "1.212455 | \n", "0.674773 | \n", "17.298323 | \n", "
top-app | \n", "0.466919 | \n", "0.276584 | \n", "0.207017 | \n", "0.197729 | \n", "3.851309 | \n", "2.598262 | \n", "1.045346 | \n", "0.325736 | \n", "8.968902 | \n", "
NaN | \n", "23.400707 | \n", "26.026429 | \n", "27.149291 | \n", "28.024113 | \n", "27.513192 | \n", "29.255163 | \n", "27.575197 | \n", "28.972064 | \n", "217.916156 | \n", "