Chrome has a noticeable performance gap comparing with Edge running WebGL Aquarium |
|||
Issue descriptionChrome Version: Any version OS: Windows 10 What steps will reproduce the problem? (1) Download WebGLSamples from https://github.com/WebGLSamples/WebGLSamples.github.io, and put it into folder of your web server (2) Put attached 2 files (aquarium-mod.html and aquarium-mod.js) in folder aquarium/ of WebGLSamples (Sorry that the related files are too large that I couldn't provide a small enough zip file here) (3) Open <your_server_path>/WebGLSamples/aquarium/aquarium-mod.html, and choose 9000 fishes with desktop Chrome and Edge separately, and observe the FPS results. What is the expected result? Chrome and Edge should have no big performance (FPS) gap. What happens instead? We see noticeable performance gap between with Edge. Below are results at my side: CPU: Intel i7-6700K (Skylake) GPU: NVIDIA GTX 1050 Ti OS: Windows 10 Browser: Edge 15.15063, Chrome r465495 (M59) Chrome FPS: 31 Edge FPS: 42 CPU: Intel i7-6700K (Skylake) GPU: Intel HD Graphics 530 (embedded GPU) OS: Windows 10 Browser: Edge 15.15063, Chrome r494699 (M62) Chrome FPS: 23 Edge FPS: 41 Some initial investigations based on r465495: 1. We compare this case between Chrome and Edge. To get comparable results (not too close to 60, and not too low), I change the benchmark a bit and use 9000 fishes instead. This also makes this case a heavy workload with 9000 DrawElements per frame. 2. This is neither a regression, nor any issue specific to hardware configuration. 3. CPU looks like the actual bottleneck, while GPU is relatively idle. 4. We can get 60 FPS under Linux, and if we use OpenGL driver directly on Windows (--use-gl=desktop), we can also get 60 FPS. So I think ANGLE has a big impact on its performance, and we may need to tune ANGLE further. We have some initial ideas on this, and want to bring a Chrome-like tracing into ANGLE first to easy the investigation. This is a TODO in our list now. 5. There are 3 validations for this case, in command buffer client, command buffer service and ANGLE. The first validation is lightweight, and if we disable it, we can get minor perf gain (< 1FPS). Chromium is migrating the second validation to ANGLE. After the migration is done, the second validation can be totally removed. Option “--use-passthrough-cmd-decoder” can be used now to bypass the second validation. If we use this option, FPS can be improved from 31 to 40. The third validation in ANGLE comes with some optimization. The optimization is to decide the indexRange so that not all data will be converted to D3D compatible type before passing to D3D driver. However, this optimization is negative for this case as we need all the data to be converted, so there is no need to calculate indexRange again and again. If we disable the validation and optimization, the FPS can be improved from 31 to 37. If we disable all the validations above, FPS is 44, which is similar to Edge. The work of second validation is almost done now. And we're working on some optimization in third validation in ANGLE (https://chromium-review.googlesource.com/c/607413). I had some rough discussion with kbr@ at crbug.com/751028 , and he replied as below: Thanks Yang. Those are great investigations. We definitely want to improve Chrome's performance on high-end workloads that make lots of draw calls. There are other customers requesting this case be improved. As you know, the short-term goal is to switch to the pass-through command buffer on Windows, so the double-validation imposed by the command buffer will be removed soon. We appreciate your help investigating the other performance overhead imposed by index validation and look forward to turning it off on platforms supporting KHR_robust_buffer_access_behavior (including implicitly all D3D based backends). So I create an issue here to track this case, so that we can continue to profile and improve the performance of Chrome with this case.
,
Aug 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/angle/angle/+/59d9da089580afac175ff5f1a932b987c9d194d6 commit 59d9da089580afac175ff5f1a932b987c9d194d6 Author: Qin Jiajia <jiajia.qin@intel.com> Date: Wed Aug 23 23:51:33 2017 Remove IndexRange retrieving in validation This change can improve the performance of drawElements which uses the path without translation. Paste a set of mean data (repeated 30) for reference on Intel skylake Win10 desktop. DrawElementsPerfBenchmark.Run/d3d11: before after mean: 13644.4666667 -> mean: 13887.8333333 DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: before after mean: 45.8 -> mean: 46.3666666667 BUG= 755897 , angleproject:1393 Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f Reviewed-on: https://chromium-review.googlesource.com/607413 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> [modify] https://crrev.com/59d9da089580afac175ff5f1a932b987c9d194d6/src/tests/gl_tests/VertexAttributeTest.cpp [modify] https://crrev.com/59d9da089580afac175ff5f1a932b987c9d194d6/src/libANGLE/renderer/d3d/VertexDataManager.h [modify] https://crrev.com/59d9da089580afac175ff5f1a932b987c9d194d6/src/libANGLE/renderer/d3d/VertexDataManager.cpp [modify] https://crrev.com/59d9da089580afac175ff5f1a932b987c9d194d6/src/libANGLE/validationES.cpp
,
Aug 24 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/660f70ed3bb7be2aee0986f1729e5bc81c947fa9 commit 660f70ed3bb7be2aee0986f1729e5bc81c947fa9 Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org> Date: Thu Aug 24 01:03:56 2017 Roll skia/third_party/externals/angle2/ abf66fb35..59d9da089 (1 commit) https://chromium.googlesource.com/angle/angle.git/+log/abf66fb35d23..59d9da089580 $ git log abf66fb35..59d9da089 --date=short --no-merges --format='%ad %ae %s' Created with: roll-dep skia/third_party/externals/angle2 BUG= 755897 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE TBR=jcgregorio@google.com Change-Id: I00177ab2f41240cd1a8f5418caf1711445f91664 Reviewed-on: https://skia-review.googlesource.com/37960 Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org> Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org> [modify] https://crrev.com/660f70ed3bb7be2aee0986f1729e5bc81c947fa9/DEPS
,
Aug 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0ea93056410c6a6a59da39ad89d51ba095e457d6 commit 0ea93056410c6a6a59da39ad89d51ba095e457d6 Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org> Date: Thu Aug 24 04:15:16 2017 Roll src/third_party/skia/ ba9741d46..660f70ed3 (1 commit) https://skia.googlesource.com/skia.git/+log/ba9741d46718..660f70ed3bb7 $ git log ba9741d46..660f70ed3 --date=short --no-merges --format='%ad %ae %s' 2017-08-23 angle-deps-roller Roll skia/third_party/externals/angle2/ abf66fb35..59d9da089 (1 commit) Created with: roll-dep src/third_party/skia BUG= 755897 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel TBR=jcgregorio@chromium.org Change-Id: I90159f652cc21198e1454ef663988addbf09dfc5 Reviewed-on: https://chromium-review.googlesource.com/631337 Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org> Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org> Cr-Commit-Position: refs/heads/master@{#496946} [modify] https://crrev.com/0ea93056410c6a6a59da39ad89d51ba095e457d6/DEPS
,
Aug 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/angle/angle/+/c1346fba608e11a8f4e7fc0d4c85d5dcf6a0b8df commit c1346fba608e11a8f4e7fc0d4c85d5dcf6a0b8df Author: Corentin Wallez <cwallez@chromium.org> Date: Thu Aug 24 16:11:59 2017 Revert "Remove IndexRange retrieving in validation" This reverts commit 59d9da089580afac175ff5f1a932b987c9d194d6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Remove IndexRange retrieving in validation > > This change can improve the performance of drawElements which uses > the path without translation. > Paste a set of mean data (repeated 30) for reference on Intel skylake > Win10 desktop. > DrawElementsPerfBenchmark.Run/d3d11: > before after > mean: 13644.4666667 -> mean: 13887.8333333 > DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: > before after > mean: 45.8 -> mean: 46.3666666667 > > BUG= 755897 , angleproject:1393 > > Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f > Reviewed-on: https://chromium-review.googlesource.com/607413 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,jiajia.qin@intel.com Change-Id: I4b00af2c32af36aa978ac2fddcf7514134497cf3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 755897 , angleproject:1393 Reviewed-on: https://chromium-review.googlesource.com/633296 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> [modify] https://crrev.com/c1346fba608e11a8f4e7fc0d4c85d5dcf6a0b8df/src/tests/gl_tests/VertexAttributeTest.cpp [modify] https://crrev.com/c1346fba608e11a8f4e7fc0d4c85d5dcf6a0b8df/src/libANGLE/renderer/d3d/VertexDataManager.h [modify] https://crrev.com/c1346fba608e11a8f4e7fc0d4c85d5dcf6a0b8df/src/libANGLE/renderer/d3d/VertexDataManager.cpp [modify] https://crrev.com/c1346fba608e11a8f4e7fc0d4c85d5dcf6a0b8df/src/libANGLE/validationES.cpp
,
Sep 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/angle/angle/+/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2 commit 8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2 Author: Jiajia Qin <jiajia.qin@intel.com> Date: Tue Sep 05 14:37:18 2017 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG= 755897 , angleproject:1393 , angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/tests/gl_tests/VertexAttributeTest.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/util/EGLWindow.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/d3d/VertexDataManager.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/tests/test_utils/ANGLETest.h [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/Context.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/util/EGLWindow.h [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/gl/wgl/DisplayWGL.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/tests/test_utils/ANGLETest.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/Caps.h [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/d3d/d3d9/renderer9_utils.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/gl/renderergl_utils.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/Caps.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/validationES_unittest.cpp [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/renderer/d3d/VertexDataManager.h [modify] https://crrev.com/8a7b3a0ced4cb84cba4014c951a49aa94cce3ae2/src/libANGLE/validationES.cpp
,
Sep 5 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/4748d81886e642d21f45741b4170f9e1fe4485ac commit 4748d81886e642d21f45741b4170f9e1fe4485ac Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org> Date: Tue Sep 05 15:51:17 2017 Roll skia/third_party/externals/angle2/ 72b4e1e5b..8a7b3a0ce (1 commit) https://chromium.googlesource.com/angle/angle.git/+log/72b4e1e5bbbb..8a7b3a0ced4c $ git log 72b4e1e5b..8a7b3a0ce --date=short --no-merges --format='%ad %ae %s' 2017-08-25 jiajia.qin Reland 'Remove IndexRange retrieving in validation' Created with: roll-dep skia/third_party/externals/angle2 BUG= 755897 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE TBR=robertphillips@google.com Change-Id: Id4e4eb0a40f72f4847c8a8ca6613b43a4050a276 Reviewed-on: https://skia-review.googlesource.com/42362 Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org> Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org> [modify] https://crrev.com/4748d81886e642d21f45741b4170f9e1fe4485ac/DEPS
,
Sep 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/00ce8c5e51ccb1e0620f92ae6611df35b19bbafc commit 00ce8c5e51ccb1e0620f92ae6611df35b19bbafc Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org> Date: Tue Sep 05 17:49:27 2017 Roll src/third_party/skia/ 2868b78f4..4748d8188 (3 commits) https://skia.googlesource.com/skia.git/+log/2868b78f469a..4748d81886e6 $ git log 2868b78f4..4748d8188 --date=short --no-merges --format='%ad %ae %s' 2017-09-05 angle-deps-roller Roll skia/third_party/externals/angle2/ 72b4e1e5b..8a7b3a0ce (1 commit) 2017-09-05 caryclark name parameters for docs 2017-08-31 bungeman Add variation support to SkShaper. Created with: roll-dep src/third_party/skia BUG= 755897 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, see: http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel TBR=robertphillips@chromium.org Change-Id: Iec0be193f7533e601b3361e1219f044e69d7b8b1 Reviewed-on: https://chromium-review.googlesource.com/650513 Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org> Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org> Cr-Commit-Position: refs/heads/master@{#499672} [modify] https://crrev.com/00ce8c5e51ccb1e0620f92ae6611df35b19bbafc/DEPS
,
Sep 28 2017
We observed huge performance improvement with recent ANGLE changes, so I further modified the case as attached to be more stressful (20000 fishes). Below are some data at our side: CPU: Intel i7-7700K (Kaby Lake) OS: Windows 10 Browser: Edge 15.15063, Latest Chrome Canary 63.0.3225.0 [GPU: Intel HD Graphics 630 (integrated GPU)] Fishes Chrome Chrome (with --use-passthrough-cmd-decoder) Edge 4K 60 60 60 6K 60 60 60 9K 52 60 47 12K 42 56 38 14K 38 50 33 16K 35 45 30 18K 31 42 27 [GPU: NVIDIA GTX 1080 (discrete GPU)] Fishes Chrome Edge 4K 60 60 6K 60 60 9K 60 44 12K 60 34 14K 53 30 16K 47 27 18K 43 24 Observations: 1. With latest Canary Chrome, its performance is already better than Edge, thanks to many improvements in ANGLE. 2. If passthrough command buffer is enabled, performance can be further improved. 3. For some reason (under investigation), we couldn't enable passthrough command buffer with NVIDIA GTX 1080.
,
Sep 28 2017
Thanks for the analysis Yang! Do you have any more information on why you couldn't enable the pas-through with the 1080? Was there any error information in about:gpu?
,
Sep 29 2017
>Do you have any more information on why you couldn't enable the pas-through with the 1080? Hi Jamie, it seems that it's the machine problem. We can't reproduce it when we unplug and plug the NVIDIA graphic card and restart the system. Below is an update for the chrome with use-passthrough-cmd-decoder Fishes chrome Chrome (with --use-passthrough-cmd-decoder) 18k 43 58 20k 39 54
,
Sep 29 2017
OK, thanks for following up. Those numbers look very good.
,
Jan 11 2018
Chrome (especially ANGLE) has made a lot of improvements and gap with Edge can no longer be seen. All known optimization opportunities in ANGLE for D3D backend have been merged. So I suggest to close this issue. Hope passthrough command buffer can be default on soon. |
|||
►
Sign in to add a comment |
|||
Comment 1 by enne@chromium.org
, Aug 17 2017