CPU usage downgrades in H264 video decoding on KBL if |decode_using_client_picture_buffers_| |
|||
Issue descriptionWe recently activated |decode_using_client_picture_buffers_| for H264 on KBL devices. https://chromium-review.googlesource.com/c/chromium/src/+/1356019 I was concerned whether it will not downgrades any power regression. So I locally experimented the power performance measurement on EVE. I play h264 1080p@30fps video on http://crosvideo.appspot.com/?codec=h264&resolution=1080. I looked the power values by executing "dump_intel_rapl_consumption --interval_ms=2000 --repeat --verbose". The results are below. They looks bad. Let me revert the change. Before the change 2.261276 0.738606 0.161822 0.780035 After the change 6.866197 5.476656 0.119479 0.585593 sree, you said the performance was good on soraka, but it was bad on eve when I experimented. Could you investigate why?
,
Dec 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d1df6533e0ac7d5e63fcf6e6339e023263da8e35 commit d1df6533e0ac7d5e63fcf6e6339e023263da8e35 Author: Hirokazu Honda <hiroh@chromium.org> Date: Mon Dec 03 03:42:56 2018 Revert "Vaapi: Activate |decode_using_client_picture_buffers_| for h264" This reverts commit f0e7045ffa0c7ea4e88a33462906f9658f35566d. Reason for revert: Power regression on eve crbug.com/910986 Original change's description: > Vaapi: Activate |decode_using_client_picture_buffers_| for h264 > > This CL cleans up and activates |decode_using_client_picture_buffers_| > after recent power consumption measurements done by the Intel folks > reveal that there should be no regression, and also because skipping > the Vpp has a huge impact in memory consumption since Va doesn't need > to allocate ~13/14 Buffer Objects inside (see crbug.com/909926). > > Bug: 909926, 822346 > Change-Id: Ie8d6b41521f5d8ee62568f9674ae071a67c290bf > Reviewed-on: https://chromium-review.googlesource.com/c/1356019 > Reviewed-by: Hirokazu Honda <hiroh@chromium.org> > Commit-Queue: Miguel Casas <mcasas@chromium.org> > Cr-Commit-Position: refs/heads/master@{#612498} TBR=mcasas@chromium.org,hiroh@chromium.org,sreerenj.balachandran@intel.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 909926, 822346 910986 Change-Id: I1cb5d54064413d27cd3472e9918c5fcd62385a1c Reviewed-on: https://chromium-review.googlesource.com/c/1358099 Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Commit-Queue: Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#612996} [modify] https://crrev.com/d1df6533e0ac7d5e63fcf6e6339e023263da8e35/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
,
Dec 3
,
Dec 3
,
Dec 3
Hiro, The numbers in your test is scary and I'm wondering why it is showing this much disparity! Is there any chance for you to test it in Soraka? I only have this platform with me now. Anyway I told few of the validation engineers to run test on other platforms.Let's see what they come up with. BTW, my test enviroment: my host machine chromium build directory has been mapped to the Soraka based chromebook and running the chrome (in Soraka) from command line using: XDG_RUNTIME_DIR=/run/chrome ./chrome --ui-prioritize-in-gpu-process --use-gl=egl --user-data-dir=/home/chronos/ --bwsi --login-user='$guest' --login-profile=user --incognito --use-cras --enable-wayland-server --enable-hardware-overlays="single-fullscreen,single-on-top,underlay" --enable-drm-atomic --enable-logging=stderr --vmodule=vaapi_*=3 --v=1 "https://........"
,
Dec 4
Just to be clear, let's propose a measuring scenario, because the numbers in #0 "after the change" don't make any sense. Follow: - https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md - please add the chrome sdk version that appears when you enter the chroot, e.g. (nocturne 11244.0.0) - compile and deploy chrome with: ninja -C out_${SDK_BOARD}/Release -j500 chrome chrome_sandbox && deploy_chrome --build-dir=out_${SDK_BOARD}/Release --to=192.168.1.10 (obviously -j 500 and the --to IP are specifics of mine) - note that to decode h264 your gn file should have had ffmpeg_branding = "Chrome" proprietary_codecs = true in it. Then: - run chrome - open a ssh connection to your device and run dump_intel_rapl_consumption --interval_ms=2000 --repeat --verbose - you should see an almost zero GFX power consumption if you do nothing in the browser (and that includes not letting the omnibar cursor blink). Then: - navigate to http://crosvideo.appspot.com/?codec=h264&mute=true&loop=true&resolution=720 and let it run for ~1 minute - you should see a spike in the beginning, correlated with loading the video and allocating network and gfx resources. then it should stabilize; discard the spike and post the average and standard deviation of the measurements.
,
Dec 4
E.g. my results for Nocturne ToT: 0.739505 0.099734 0.037282 0.456169 0.742061 0.101362 0.037408 0.457411 0.741689 0.101003 0.037014 0.457293 0.753083 0.116868 0.036830 0.455390 2.011148 0.781603 0.377664 0.903209 2.656747 0.971860 0.716018 1.069022 1.161475 0.293359 0.123855 0.548271 1.164903 0.295650 0.123917 0.548276 1.251738 0.367374 0.123496 0.575824 1.271043 0.382854 0.123183 0.578202 1.149589 0.282469 0.123460 0.548949 1.171657 0.304669 0.124492 0.548405 1.200973 0.324456 0.124528 0.563351 1.221759 0.342566 0.124431 0.566285 1.239693 0.360685 0.122669 0.563669 1.227662 0.353332 0.124612 0.557216 1.143875 0.277463 0.121567 0.548091 1.175363 0.302103 0.123649 0.550895 1.198689 0.321911 0.125847 0.553525 1.759805 0.746455 0.177207 0.730984 1.219216 0.374120 0.158406 0.584616 0.861019 0.191616 0.046104 0.476629 0.963266 0.277416 0.040306 0.514738 0.768693 0.110698 0.044426 0.467751 So the pkg power consumption is ~1.2W ish (note the spikes at the beginning and end).
,
Dec 4
Whereas if I enable |decode_using_client_picture_buffers_| and playback the same video as described on #c6, I see: 0.415691 0.033776 0.000000 0.139591 0.442245 0.058736 0.000000 0.142370 0.437457 0.051444 0.000000 0.147528 0.416311 0.033808 0.000000 0.138252 0.587514 0.114311 0.015563 0.247145 2.694370 1.444791 0.392012 0.869224 2.816063 1.587085 0.349044 0.831383 1.824070 1.335759 0.007812 0.187549 2.198813 1.607235 0.029082 0.297437 2.404062 1.563841 0.091975 0.541044 2.470985 1.649713 0.086146 0.520630 2.474739 1.617520 0.089777 0.565885 2.375010 1.542235 0.092859 0.529418 2.381521 1.548895 0.092188 0.528047 2.390356 1.545681 0.096674 0.539853 2.488062 1.653113 0.092830 0.527164 2.493422 1.621634 0.098384 0.571234 2.398049 1.554838 0.101648 0.529448 2.363591 1.515500 0.103479 0.532651 2.368416 1.530882 0.097315 0.522795 2.465806 1.628409 0.093532 0.526924 2.479052 1.604516 0.097286 0.572303 2.386619 1.545101 0.094570 0.532418 2.367413 1.530915 0.094874 0.524169 2.406322 1.562927 0.095118 0.531524 2.515263 1.679161 0.094507 0.523346 2.398769 1.543071 0.103907 0.541048 2.483971 1.606392 0.102198 0.573762 2.399634 1.550809 0.102472 0.532255 2.418190 1.563627 0.105218 0.535765 1.824481 1.036715 0.096297 0.527618 0.568038 0.106528 0.006469 0.238323 0.411640 0.030116 0.000000 0.138434 0.411520 0.030177 0.000000 0.139380 Where you can see: a) the pkg power consumption (first column) is clearly ~2.4W, higher (worse) than #7 b) the numbers are not 3x as in #0, hiroh@ could you verify your results with a 720p video and repeat w/ a 1080p?
,
Dec 5
Hi, I verified Nocturn ToT with enabling |decode_using_client_picture_buffers_| 1080P is much higher than 720P. 720P (http://crosvideo.appspot.com/?codec=h264&resolution=720) 2.276366 1.371581 0.126060 0.740917 1.142154 0.273439 0.122088 0.696430 1.124155 0.257702 0.123252 0.703379 1080P (http://crosvideo.appspot.com/?codec=h264&resolution=1080) 5.048390 4.154015 0.131861 0.665410 4.874466 3.971504 0.136589 0.663504 4.941633 4.043171 0.140772 0.653050 4.978505 4.085815 0.143609 0.647127
,
Dec 5
Related bug: Issue 912295
,
Dec 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e58ff43be711ddf8132cdb298942a87ecf1f4e79 commit e58ff43be711ddf8132cdb298942a87ecf1f4e79 Author: Miguel Casas <mcasas@chromium.org> Date: Wed Dec 05 20:45:23 2018 Vaapi decode: extract ShouldDecodeOnclientPictureBuffers() Cleanup: extract ShouldDecodeOnclientPictureBuffers(), which is used in e.g. relanding crrev.com/c/1356019, crrev.com/c/1348869. No new code intended, just extracting that method, that was already reviewed and landed. TBR=hiroh@chromium.org Bug: 909926, 910986, 912295 Change-Id: I24112e737b882484802e5236235164490360ee6f Reviewed-on: https://chromium-review.googlesource.com/c/1363796 Commit-Queue: Miguel Casas <mcasas@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#614089} [modify] https://crrev.com/e58ff43be711ddf8132cdb298942a87ecf1f4e79/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
,
Dec 6
Hi, we have power measurement results for Soraka and Eve boards (KBL). Please check the attached excel "Soraka_Eve_PowerMeasurements.xlsx".
,
Dec 10
Could you give us non .xlsx format? I personally want to avoid opening .xlsx formatted file. How about using Google Spread Sheet?
,
Dec 10
I'm wondering whether it is a regression in specific stack since I still can't reproduce the issue with my setup! sdk promt (after entering cros chrome_sdk ...... )showing: sdk amd64-generic R73-11327.0.0-rc2 in host machine, cros_sdk_version in args.gn is 11355.0.0, chrome://verison shows 73.0.3633.0 It seems everyone except me is able to reproduce the issue one way or another, even though the results are not matching.. !
,
Dec 11
Could you show me your gn args? I usually start chrome chroot with `cros chrome-sdk --board=soraka --internal`. I don't know --internal is able to be used for external developers. If isn't, please start without --internal and execute `gn gen out_$SDK_BOARD/Release --args="$GN_ARGS" ffmpeg_branding="Chrome" proprietary_codecs=true"` in chrome chroot. Additionally, please make sure VA VDA is used on device seeing chrome://media-internals. VA VDA is used if "video_decoder" is "GpuVideoDecoder" on the associated player.
,
Dec 11
My chroot entrance is like this: cros chrome-sdk --board=amd64-generic --nogoma --clang --gn-extra-args='proprietary_codecs=true ffmpeg_branding="Chrome" google_api_key="xxxx" google_default_client_id="xxxxx" google_default_client_secret="xxxx"' --log-level=info
Of course it is using gpuvidedecoder (i have internal print messages too to make sure)
Here is my gn.args (api keys are my own)
blink_symbol_level = 0
clang_use_chrome_plugins = false
cros_board = "amd64-generic"
cros_host_ar =
"/home/sreerenj/chromium/src/third_party/binutils/Linux_x64/Release/bin/ar"
cros_host_cc = "/home/sreerenj/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
cros_host_cxx = "/home/sreerenj/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
cros_host_extra_cflags = " -Wno-unknown-warning-option"
cros_host_extra_cppflags = ""
cros_host_extra_cxxflags = " -Wno-unknown-warning-option"
cros_host_extra_ldflags = ""
cros_host_is_clang = true
cros_host_ld = "/home/sreerenj/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
cros_host_nm =
"/home/sreerenj/chromium/src/third_party/binutils/Linux_x64/Release/bin/nm"
cros_sdk_version = "11355.0.0"
cros_target_ar = "llvm-ar"
cros_target_cc = "/home/sreerenj/chromium/src/build/cros_cache/chrome-sdk/tarballs/amd64-generic+11355.0.0+target_toolchain/bin/x86_64-cros-linux-gnu-clang"
cros_target_cxx = "/home/sreerenj/chromium/src/build/cros_cache/chrome-sdk/tarballs/amd64-generic+11355.0.0+target_toolchain/bin/x86_64-cros-linux-gnu-clang++"cros_target_extra_cflags = "-pipe -march=x86-64 -msse3 -fno-split-dwarf-inlining -fdebug-info-for-profiling -Wno-unknown-warning-option -Wno-inline-asm -B../../build/cros_cache/chrome-sdk/tarballs/amd64-generic+11355.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option"
cros_target_extra_cppflags = ""
cros_target_extra_cxxflags = "-pipe -march=x86-64 -msse3 -fno-split-dwarf-inlining -fdebug-info-for-profiling -D__google_stl_debug_vector=1 -Wno-unknown-warning-option -stdlib=libc++ -Wno-inline-asm -B../../build/cros_cache/chrome-sdk/tarballs/amd64-generic+11355.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option"
cros_target_extra_ldflags = "-Wl,-O2 -Wl,--as-needed -stdlib=libc++"
cros_target_ld = "x86_64-cros-linux-gnu-clang++ -B/home/sreerenj/chromium/src/build/cros_cache/chrome-sdk/tarballs/amd64-generic+11355.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option"
cros_target_nm = "x86_64-cros-linux-gnu-nm"
cros_v8_snapshot_ar =
"/home/sreerenj/chromium/src/third_party/binutils/Linux_x64/Release/bin/ar"
cros_v8_snapshot_cc = "/home/sreerenj/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
cros_v8_snapshot_cxx = "/home/sreerenj/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
cros_v8_snapshot_extra_cflags = " -Wno-unknown-warning-option"
cros_v8_snapshot_extra_cppflags = ""
cros_v8_snapshot_extra_cxxflags = " -Wno-unknown-warning-option"
cros_v8_snapshot_extra_ldflags = ""
cros_v8_snapshot_is_clang = true
cros_v8_snapshot_ld = "/home/sreerenj/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
cros_v8_snapshot_nm =
"/home/sreerenj/chromium/src/third_party/binutils/Linux_x64/Release/bin/nm"
custom_toolchain = "//build/toolchain/cros:target"
enable_nacl = true
enable_remoting = true
ffmpeg_branding = "Chrome"
goma_dir = "/home/chrome-bot/goma"
google_api_key = "xxxxx"
google_default_client_id =
"xxxxxx"
google_default_client_secret = "xxxxx"
host_pkg_config = "pkg-config"
host_toolchain = "//build/toolchain/cros:host"
icu_use_data_file = true
is_asan = false
is_cfi = false
is_clang = true
is_debug = false
linux_use_bundled_binutils = true
ozone_auto_platforms = false
ozone_platform = "gbm"
ozone_platform_gbm = true
proprietary_codecs = true
remove_webcore_debug_symbols = false
system_libdir = "lib64"
target_cpu = "x64"
target_os = "chromeos"
target_sysroot = "/home/sreerenj/chromium/src/build/cros_cache/chrome-sdk/tarballs/amd64-generic+11355.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz"
treat_warnings_as_errors = false
use_bundled_fontconfig = false
use_cfi_cast = false
use_cras = true
use_cups = true
use_debug_fission = true
use_evdev_gestures = true
use_goma = false
use_jumbo_build = false
use_lld = false
use_new_tcmalloc = false
use_ozone = true
use_system_freetype = false
use_system_harfbuzz = false
use_system_libdrm = true
use_system_libsync = true
use_system_minigbm = true
use_thin_lto = false
use_v4l2_codec = true
use_v4lplugin = false
use_vaapi = true
use_xkbcommon = true
v8_snapshot_toolchain = "//build/toolchain/cros:v8_snapshot"
,
Dec 11
#16: In general try not to use --board=amd64-generic but something more specific, i.e. --board=soraka etc. There might be subtle differences that we want to avoid here (e.g. blacklisting a given driver or feature).
,
Dec 12
I think the --board=soraka or anything other than amd64-generic only works for google employees. right?
,
Dec 13
To specify --board, one has to be able to access an internal gs buckets. The permission is controlled by ACL and I don't know intel folks have the permission.
You can still build Chrome with --board=soraka, by specifying --chroot on "cros chrome-sdk"
For example, `cros chrome-sdk --board=soraka --chroot=${MY_CHROMEOS_DIR}/chroot`
See https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md#using-a-custom-chrome-os-build
,
Dec 14
Hiro, I'm not sure even that one can work This is what I got when tried to use soaraka as board name: Anonymous caller does not have storage.objects.get access to chromeos-image-archive/soraka-...
,
Dec 14
Hmm, are you executing with --chroot?
,
Dec 14
Yes..Also Instead of anonymous, I tried with my intel account and partner account but both failing.
,
Dec 15
I see. Let me find the way on Monday.
,
Jan 9
Is there any improvement on this case with Miguel's patches in https://bugs.chromium.org/p/chromium/issues/detail?id=912295&desc=2 ? I still can't see much difference in h264 power number, but vp8 seems to reproducing the issue :)
,
Jan 9
Hi, sree. Sorry for late response. Regarding improvement, I will check it later. I have no idea why you fail with --chroot. In my case, the following command is successful. $ cros chrome-sdk --board=eve --chroot=~/chromeos/chroot
,
Jan 9
Oh, you may have to do, in chromeos-chroot,
~/trunk/src/scripts $ ./setup_board --board ${BOARD}
Please replace ${BOARD} with a proper board name (e.g. eve)
,
Jan 9
I tried all options, everything failed if I use a specific board name; So I asked a few Intel guys who are using the simple chrome method and so far none manged to build it with non-generic board name. So I strongly believe this option is only for Googlers.
,
Jan 9
@hiroh, @mcasas: If the issue is sill there, It could be worth bench-marking with the new intel-driver (iHD). https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1339060 Let's see whether both driver giving the same issue. BTW, with amd64-generic as board-name, what could be the significant stack changes which may affect the media performance? |
|||
►
Sign in to add a comment |
|||
Comment 1 by hiroh@chromium.org
, Dec 3