Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome heap snapshots statistics, what does the grey color represent?

enter image description here

What does the grey color represents in above chart?

like image 242
Wayne Wang Avatar asked Mar 31 '15 09:03

Wayne Wang


People also ask

How do I read heap snapshots?

Use memory profiling in inspector Run node with --inspect flag and open the inspector. The simplest way to get a Heap Snapshot is to connect a inspector to your process running locally. Then go to Memory tab and take a heap snapshot.

How do I check my Chrome heap memory?

To find out how much memory different pages use, you should open the built-in Chrome Task Manager. After opening the Chrome Memory tab, you are introduced with three options to investigate website's memory usage: you can take a heap snapshot, start allocation instrumentation on a timeline, or begin allocation sampling.

What is a Chrome memory leak?

This is the outcome when you open multiple tabs in your browser, which in turn uses more RAM. Therefore, it may freeze or hang your device for a few minutes. Anyway, without wasting any time let's see How to Fix Chrome Memory Leak & reduce high RAM usage with the help of the below-listed tutorial.

What is the purpose of taking a heap snapshot?

This command allows you to take a snapshot of how your heap memory is distributed among your page's JavaScript objects and related DOM nodes, which then can be loaded into Chrome DevTools to analyze and find any memory leaks.


2 Answers

Unallocated Memory

Memory Statistics Example


Total Memory: 20,526 KB

Total Allocated Memory: 1925 + 2939 + 2918 + 494 + 840 = 9,116 KB

Total Unallocated Memory: 20,526 - 9,116 = 11,410 KB


11410 / 20526 = ~0.56 (0.56/1) which is the area shaded on the graph.

Total Unallocated Memory / Total Memory = Shaded Area

Memory Allocation Diagram

Doughnut chart showing allocated memory vs unallocated memory

like image 61
ADAMJR Avatar answered Sep 28 '22 03:09

ADAMJR


Total value

In a represented Heap Snapshot Statictics pie chart –

TOTAL is a total memory heap distribution between JavaScript objects and associated DOM nodes. Also I should say that the heap is a memory set aside for dynamic allocation.

According to Chrome Memory Tab article:

Memory leaks occur when a website is using more energy than necessary. Severe memory leaks can even make sites unusable. Since the JavaScript memory leak detector is a part of the Google Chrome browser, you should not hesitate to select a profiling type and analyze your website’s memory usage.

Google Chrome heap snapshot will reveal memory distribution between JavaScript objects and associated DOM nodes. This feature is useful because you will be able to compare different snapshots and find memory leak.

enter image description here

like image 28
Andy Jazz Avatar answered Sep 28 '22 05:09

Andy Jazz