New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 815259 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Garbage Collector Unexpected Full Heap Collections Cause Performance Issues

Reported by dannyyy5...@googlemail.com, Feb 23 2018

Issue description

UserAgent: 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
 
GC Jank Example For Reproduction.zip
9.7 MB Download
Labels: Needs-Triage-M64
Cc: susan.boorgula@chromium.org
Components: Platform>Extensions
Labels: Triaged-ET Needs-Feedback
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..
815259.mp4
4.0 MB View Download
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.
GC Jank Example Video.mp4
6.9 MB View Download
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 1 2018

Labels: -Needs-Feedback
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
I would really appreciate some feedback regarding this issue. I've provided further steps for reproduction in comment #3.
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)
Labels: Needs-Feedback
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..
815259-M67.mp4
3.2 MB View Download
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!
GC Jank.zip
3.5 MB Download
GC Jank.png
79.4 KB View Download
Project Member

Comment 9 by sheriffbot@chromium.org, Jun 4 2018

Labels: -Needs-Feedback
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
Cc: rdevlin....@chromium.org
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..


815259-Win7.PNG
103 KB View Download
Labels: TE-NeedsTriageHelp
As issue is not reproducible from TE end adding TE-NeedsTriageHelp label for further help in triaging from dev team.

Thanks!
I'm noticing this as well in HTML5 games. I get janks often in regular intervals. Causes framerate to drop and a noticeable jank.


Major_GC.jpg
266 KB View Download
Components: -Platform>Extensions Blink>JavaScript>GC
Status: Untriaged (was: Unconfirmed)
Probably not extensions specific.  Taking a stab that the right label is Javascript>GC, but feel free to update if it's not.
Cc: u...@chromium.org hpayer@chromium.org
Status: Available (was: Untriaged)
Something for our Jank busters ;-)
Would appreciate if someone could look into this soon.
Can still reproduce using Chrome M71.
Cc: keishi@chromium.org mlippautz@chromium.org
Components: -Blink>JavaScript>GC Blink>MemoryAllocator>GarbageCollection
Owner: haraken@chromium.org
Status: Assigned (was: Available)
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