Garbage Collector Unexpected Full Heap Collections Cause Performance Issues
Reported by
dannyyy5...@googlemail.com,
Feb 23 2018
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36 Steps to reproduce the problem: 1. Install and run "GC Jank" example (Chrome Extension) 2. Click button "Load All Audio Files Into Memory" 3. Wait until "Tell GC To Unload Files & Switch Layout" button is clickable 4. Click on the button as soon as it's available and observe full heap collection What is the expected behavior? GC should avoid doing expensive full heap collections and should slice work in to small (non-janking) collections instead. What went wrong? GC is doing one full heap collection and causing performance issues (jank). This is especially noticeable in HTML5 games which have to run jank-free in order to ensure a good and enjoyable user experience. Did this work before? No Does this work in other browsers? N/A Chrome version: 64.0.3282.167 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Attached files include: - Performance profile - Example for reproduction
,
Mar 1 2018
dannyyy55fly@ Thanks for the issue. Tested this issue on Windows 10 on the reported version 64.0.3282.167 and the latest Canary 66.0.3357.0 by following the below steps. 1. Launched Chrome and added the given Extensions. 2. Clicked the button "Load All Audio Files Into Memory" and then on "Tell GC To Unload Files & Switch Layout" when the button is clickable. 3. Launched the Task manager and could no observe any increase in CPU usage and no performance issues are seen. Attached is the screen cast for reference. Request you to check and confirm if anything is missed from our end in triaging the issue. Also request you to provide a screen cast for the better understanding of the issue. Thanks..
,
Mar 1 2018
susan.boorgula@ Thanks for the quick response. It seems like there is a problem when loading the audio files into memory on your end, currently not sure how this could happen. I was able to reproduce this on Win7, Win8.1 and Win10 machines without any preloading problems. In my previous comment I've also attached a detailed performance profile which can be run in the "Performance" tab in Chrome's Dev-Tools. 1. Open Dev-tools 2. Click on "Performance" tab 3. Click on "Load Profile..." button Here is the requested video showcasing the issue. Unexpected full heap collection is occurring at about ~0:16.
,
Mar 1 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 1 2018
I would really appreciate some feedback regarding this issue. I've provided further steps for reproduction in comment #3.
,
Jun 1 2018
susan.boorgula@ I would like to request some feedback regarding this issue. Below you can find another way to reproduce it using a 3rd party hoster. Steps to reproduce the problem: 1. Visit https://therealdannyyy.itch.io/gc-jank-example-for-reproduction 2. Click button "Load All Audio Files Into Memory" 3. Wait until "Tell GC To Unload Files & Switch Layout" button is clickable 4. Click on the button as soon as it's available and observe full heap collection Chrome version: 67.0.3396.62 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
,
Jun 4 2018
dannyyy55fly@ Apologies for the delay in updating the issue. Tested this issue on Windows 10 on the latest Stable 67.0.3396.62 and Canary 69.0.3449.0 by following the below steps. 1. Launched Chrome and navigated to the given link in comment #6. 2. Clicked button "Load All Audio Files Into Memory" and then clicked "Tell GC To Unload Files & Switch Layout" button when it is clickable. 3. Navigated to Devtools -> Memory ->and took a Heap Snapshot and couldn't observe any increase in Heap collection. Attached is the screen cast for reference. Request you to please let us know as to where to check the heap collection. And also request you to update chrome to the latest Stable 67.0.3396.62 and update the thread with the observations. Thanks..
,
Jun 4 2018
susan.boorgula@ The heap collection occurs when the GC decides to do a collection, mostly 4-6 seconds after the switch to the next layout (rotating sprite) happens. I could reproduce the full heap collection using both Chrome Stable 67.0.3396.62 and Chrome Canary 69.0.3449.0 on Windows 7. This full heap collection issue might be exclusive to Windows 7, so I'd highly recommend reproduction on that OS if available. I've tried taking a heapsnapshot at about the exact moment when the full heap collection happens on my end, not sure if I did it correctly since I've personally never used this feature before. Attached are 3 files: - GC Jank.heapsnapshot (Dev-tools Memory tab) - GC Jank.json (Dev-tools Performance tab) - GC Jank.png (Shows unexpected full heap collection) Thanks for the response!
,
Jun 4 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 7 2018
dannyyy55fly@ Thanks for the update. Tested this issue on Windows 7 on the Chrome Stable 67.0.3396.62 and unable to reproduce the issue by following the below steps. 1. Launched Chrome and navigated to https://therealdannyyy.itch.io/gc-jank-example-for-reproduction. 2. Clicked button "Load All Audio Files Into Memory" and then clicked "Tell GC To Unload Files & Switch Layout" button when it is clickable. 3. Navigated to Devtools -> Performance tab and recorded the performance for ~14 secs. 4. Couldn't observe any rise in heap collection. Attached is the screen shot for reference. As this issue is not reproducible at TE end, cc'ing rdevlin.cronin@ from Platform>Extensions team requesting for further help in triaging this issue. Thanks..
,
Jun 12 2018
As issue is not reproducible from TE end adding TE-NeedsTriageHelp label for further help in triaging from dev team. Thanks!
,
Sep 5
I'm noticing this as well in HTML5 games. I get janks often in regular intervals. Causes framerate to drop and a noticeable jank.
,
Sep 5
Probably not extensions specific. Taking a stab that the right label is Javascript>GC, but feel free to update if it's not.
,
Sep 13
Something for our Jank busters ;-)
,
Dec 5
Would appreciate if someone could look into this soon. Can still reproduce using Chrome M71.
,
Dec 5
Thank you for reporting and preparing the demo page! The "GC Jank.png" in comment 8 shows that "DOM GC (complete sweep)" runs for 192ms. Assigning to Kentaro for further triaging. On Linux desktop I was able to reproduce ~20ms pause, so this might be specific to Windows. |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by susan.boorgula@chromium.org
, Feb 25 2018