From ff5581050c2ef608bd67445fb1d61ddf7c54e66f Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:37:50 -0800 Subject: [PATCH 1/9] Fixed menu test --- doc/.NETMemoryPerformanceAnalysis.md | 48 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index eea1f7f..9765246 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -73,47 +73,47 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[GC fundamentals](#GC-Fundamentals) -:black_small_square:[Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) +- :black_small_square:[Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) -- [GC heap is only one kind of memory usage in your process](#GC-heap-is-only-one-kind-of-memory-usage-in-your-process) + - [GC heap is only one kind of memory usage in your process](#GC-heap-is-only-one-kind-of-memory-usage-in-your-process) -- [GC is per process but is aware of physical memory load on the machine](#GC-is-per-process-but-is-aware-of-physical-memory-load-on-the-machine) + - [GC is per process but is aware of physical memory load on the machine](#GC-is-per-process-but-is-aware-of-physical-memory-load-on-the-machine) -:black_small_square:[Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) +- :black_small_square:[Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) -- [GCs are triggered mostly due to allocations](#GCs-are-triggered-mostly-due-to-allocations) -- [Other factors that would trigger GCs](#Other-factors-that-would-trigger-GCs) + - [GCs are triggered mostly due to allocations](#GCs-are-triggered-mostly-due-to-allocations) + - [Other factors that would trigger GCs](#Other-factors-that-would-trigger-GCs) -:black_small_square:[Understanding cost of allocations](#Understanding-cost-of-allocations) +- :black_small_square:[Understanding cost of allocations](#Understanding-cost-of-allocations) -:black_small_square:[How to look at the GC heap size properly](#How-to-look-at-the-GC-heap-size-properly) +- :black_small_square:[How to look at the GC heap size properly](#How-to-look-at-the-GC-heap-size-properly) -- [Looking at the GC heap size wrt when GCs happen](#Looking-at-the-GC-heap-size-wrt-when-GCs-happen) -- [The allocation budget](#The-allocation-budget) -- [The effect of a generational GC](#The-effect-of-a-generational-GC) -- [Fragmentation (free objects) is part of the heap size](#Fragmentation-free-objects-is-part-of-the-heap-size) -- [GC's own bookkeeping](#GCs-own-bookkeeping) -- [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) + - [Looking at the GC heap size wrt when GCs happen](#Looking-at-the-GC-heap-size-wrt-when-GCs-happen) + - [The allocation budget](#The-allocation-budget) + - [The effect of a generational GC](#The-effect-of-a-generational-GC) + - [Fragmentation (free objects) is part of the heap size](#Fragmentation-free-objects-is-part-of-the-heap-size) + - [GC's own bookkeeping](#GCs-own-bookkeeping) + - [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) -:black_small_square:[Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) +- :black_small_square:[Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) -- [How long an individual GC lasts](#How-long-an-individual-GC-lasts) + - [How long an individual GC lasts](#How-long-an-individual-GC-lasts) -- [How often GCs are triggered](#How-often-GCs-are-triggered) + - [How often GCs are triggered](#How-often-GCs-are-triggered) -- [The one rule to remember](#The-one-rule-to-remember) + - [The one rule to remember](#The-one-rule-to-remember) -- [What makes an object survive](#What-makes-an-object-survive) + - [What makes an object survive](#What-makes-an-object-survive) - [1. The generational aspect](#1-The-generational-aspect) + - [1. The generational aspect](#1-The-generational-aspect) - [2. User roots](#2-User-roots) + - [2. User roots](#2-User-roots) - [3. managed memory leaks](#3-managed-memory-leaks) + - [3. managed memory leaks](#3-managed-memory-leaks) -- [“Mainline GC scenario” vs “not mainline”](#Mainline-GC-scenario-vs-not-mainline) + - [“Mainline GC scenario” vs “not mainline”](#Mainline-GC-scenario-vs-not-mainline) -- [Part of the GC pause that’s not doing GC at all – thread suspension](#Part-of-the-GC-pause-thats-not-doing-GC-at-all-–-thread-suspension) + - [Part of the GC pause that’s not doing GC at all – thread suspension](#Part-of-the-GC-pause-thats-not-doing-GC-at-all-–-thread-suspension) **[Know when to worry](#Know-when-to-worry)** From ab20068ec2f4eb0ee6010ee7d007d536f030db9f Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:41:00 -0800 Subject: [PATCH 2/9] Removed small checks --- doc/.NETMemoryPerformanceAnalysis.md | 52 ++++++++-------------------- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index 9765246..82c7e93 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -73,21 +73,15 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[GC fundamentals](#GC-Fundamentals) -- :black_small_square:[Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) - +- [Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) - [GC heap is only one kind of memory usage in your process](#GC-heap-is-only-one-kind-of-memory-usage-in-your-process) - - [GC is per process but is aware of physical memory load on the machine](#GC-is-per-process-but-is-aware-of-physical-memory-load-on-the-machine) -- :black_small_square:[Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) - +- [Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) - [GCs are triggered mostly due to allocations](#GCs-are-triggered-mostly-due-to-allocations) - [Other factors that would trigger GCs](#Other-factors-that-would-trigger-GCs) - -- :black_small_square:[Understanding cost of allocations](#Understanding-cost-of-allocations) - -- :black_small_square:[How to look at the GC heap size properly](#How-to-look-at-the-GC-heap-size-properly) - +- [Understanding cost of allocations](#Understanding-cost-of-allocations) +- [How to look at the GC heap size properly](#How-to-look-at-the-GC-heap-size-properly) - [Looking at the GC heap size wrt when GCs happen](#Looking-at-the-GC-heap-size-wrt-when-GCs-happen) - [The allocation budget](#The-allocation-budget) - [The effect of a generational GC](#The-effect-of-a-generational-GC) @@ -95,24 +89,15 @@ When I was writing this document I intended to introduce concepts like concurren - [GC's own bookkeeping](#GCs-own-bookkeeping) - [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) -- :black_small_square:[Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) - +- [Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) - [How long an individual GC lasts](#How-long-an-individual-GC-lasts) - - [How often GCs are triggered](#How-often-GCs-are-triggered) - - [The one rule to remember](#The-one-rule-to-remember) - - [What makes an object survive](#What-makes-an-object-survive) - - [1. The generational aspect](#1-The-generational-aspect) - - [2. User roots](#2-User-roots) - - [3. managed memory leaks](#3-managed-memory-leaks) - - [“Mainline GC scenario” vs “not mainline”](#Mainline-GC-scenario-vs-not-mainline) - - [Part of the GC pause that’s not doing GC at all – thread suspension](#Part-of-the-GC-pause-thats-not-doing-GC-at-all-–-thread-suspension) **[Know when to worry](#Know-when-to-worry)** @@ -139,26 +124,17 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[High % Pause time in GC](#High--Pause-time-in-GC) -:black_small_square:[Too many pauses, ie, too many GCs](#Too-many-pauses-ie-too-many-GCs) - -- [Measure allocations](#Measure-allocations) - -- [How to see why a GC decided to collect a generation](#How-to-see-why-a-GC-decided-to-collect-a-generation) - -:black_small_square:[Long individual pauses](#Long-individual-pauses) - -- [First of all, do you have a managed memory leak?](#First-of-all-do-you-have-a-managed-memory-leak) - -- [Are the long pauses due to ephemeral GCs, full blocking GCs or BGCs?](#Are-the-long-pauses-due-to-ephemeral-GCs-full-blocking-GCs-or-BGCs) - -- [Figuring out the amount of work for gen2 GCs](#Figuring-out-the-amount-of-work-for-gen2-GCs) - -- [Figuring out the amount of work for ephemeral GCs](#Figuring-out-the-amount-of-work-for-ephemeral-GCs) - -- [Figuring out if the long GCs are due to GC work or not](#Figuring-out-if-the-long-GCs-are-due-to-GC-work-or-not) +- [Too many pauses, ie, too many GCs](#Too-many-pauses-ie-too-many-GCs) + - [Measure allocations](#Measure-allocations) + - [How to see why a GC decided to collect a generation](#How-to-see-why-a-GC-decided-to-collect-a-generation) + - [Long individual pauses](#Long-individual-pauses) + - [First of all, do you have a managed memory leak?](#First-of-all-do-you-have-a-managed-memory-leak) + - [Are the long pauses due to ephemeral GCs, full blocking GCs or BGCs?](#Are-the-long-pauses-due-to-ephemeral-GCs-full-blocking-GCs-or-BGCs) + - [Figuring out the amount of work for gen2 GCs](#Figuring-out-the-amount-of-work-for-gen2-GCs) + - [Figuring out the amount of work for ephemeral GCs](#Figuring-out-the-amount-of-work-for-ephemeral-GCs) + - [Figuring out if the long GCs are due to GC work or not](#Figuring-out-if-the-long-GCs-are-due-to-GC-work-or-not) :black_medium_square:[Large GC heap size](#Large-GC-heap-size) - - [Debugging OOM](#Debugging-OOM) - [Is the Peak size too large but the After size is not?](#Is-the-Peak-size-too-large-but-the-After-size-is-not) - [Is the After size too large?](#Is-the-After-size-too-large) From b4c55e6469e28286f829b88272bd9546c86f600f Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:46:18 -0800 Subject: [PATCH 3/9] Adding the small square back test --- doc/.NETMemoryPerformanceAnalysis.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index 82c7e93..7ff630c 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -73,11 +73,11 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[GC fundamentals](#GC-Fundamentals) -- [Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) +- :black_small_square:[Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) - [GC heap is only one kind of memory usage in your process](#GC-heap-is-only-one-kind-of-memory-usage-in-your-process) - [GC is per process but is aware of physical memory load on the machine](#GC-is-per-process-but-is-aware-of-physical-memory-load-on-the-machine) -- [Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) +- :black_small_square:[Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) - [GCs are triggered mostly due to allocations](#GCs-are-triggered-mostly-due-to-allocations) - [Other factors that would trigger GCs](#Other-factors-that-would-trigger-GCs) - [Understanding cost of allocations](#Understanding-cost-of-allocations) @@ -89,7 +89,7 @@ When I was writing this document I intended to introduce concepts like concurren - [GC's own bookkeeping](#GCs-own-bookkeeping) - [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) -- [Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) +- :black_small_square:[Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) - [How long an individual GC lasts](#How-long-an-individual-GC-lasts) - [How often GCs are triggered](#How-often-GCs-are-triggered) - [The one rule to remember](#The-one-rule-to-remember) @@ -127,12 +127,13 @@ When I was writing this document I intended to introduce concepts like concurren - [Too many pauses, ie, too many GCs](#Too-many-pauses-ie-too-many-GCs) - [Measure allocations](#Measure-allocations) - [How to see why a GC decided to collect a generation](#How-to-see-why-a-GC-decided-to-collect-a-generation) - - [Long individual pauses](#Long-individual-pauses) - - [First of all, do you have a managed memory leak?](#First-of-all-do-you-have-a-managed-memory-leak) - - [Are the long pauses due to ephemeral GCs, full blocking GCs or BGCs?](#Are-the-long-pauses-due-to-ephemeral-GCs-full-blocking-GCs-or-BGCs) - - [Figuring out the amount of work for gen2 GCs](#Figuring-out-the-amount-of-work-for-gen2-GCs) - - [Figuring out the amount of work for ephemeral GCs](#Figuring-out-the-amount-of-work-for-ephemeral-GCs) - - [Figuring out if the long GCs are due to GC work or not](#Figuring-out-if-the-long-GCs-are-due-to-GC-work-or-not) + +- [Long individual pauses](#Long-individual-pauses) + - [First of all, do you have a managed memory leak?](#First-of-all-do-you-have-a-managed-memory-leak) + - [Are the long pauses due to ephemeral GCs, full blocking GCs or BGCs?](#Are-the-long-pauses-due-to-ephemeral-GCs-full-blocking-GCs-or-BGCs) + - [Figuring out the amount of work for gen2 GCs](#Figuring-out-the-amount-of-work-for-gen2-GCs) + - [Figuring out the amount of work for ephemeral GCs](#Figuring-out-the-amount-of-work-for-ephemeral-GCs) + - [Figuring out if the long GCs are due to GC work or not](#Figuring-out-if-the-long-GCs-are-due-to-GC-work-or-not) :black_medium_square:[Large GC heap size](#Large-GC-heap-size) - [Debugging OOM](#Debugging-OOM) From 408b3a2eebc3b58f430082b9c6e7bd0f652b6aa8 Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:47:16 -0800 Subject: [PATCH 4/9] removed the small black square as it wasn't needed anymore --- doc/.NETMemoryPerformanceAnalysis.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index 7ff630c..1a0809c 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -73,11 +73,11 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[GC fundamentals](#GC-Fundamentals) -- :black_small_square:[Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) +- [Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) - [GC heap is only one kind of memory usage in your process](#GC-heap-is-only-one-kind-of-memory-usage-in-your-process) - [GC is per process but is aware of physical memory load on the machine](#GC-is-per-process-but-is-aware-of-physical-memory-load-on-the-machine) -- :black_small_square:[Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) +- [Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) - [GCs are triggered mostly due to allocations](#GCs-are-triggered-mostly-due-to-allocations) - [Other factors that would trigger GCs](#Other-factors-that-would-trigger-GCs) - [Understanding cost of allocations](#Understanding-cost-of-allocations) @@ -89,7 +89,7 @@ When I was writing this document I intended to introduce concepts like concurren - [GC's own bookkeeping](#GCs-own-bookkeeping) - [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) -- :black_small_square:[Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) +- [Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) - [How long an individual GC lasts](#How-long-an-individual-GC-lasts) - [How often GCs are triggered](#How-often-GCs-are-triggered) - [The one rule to remember](#The-one-rule-to-remember) From f354b53ced38fd021ceff187d276769871424159 Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:50:21 -0800 Subject: [PATCH 5/9] Fixed chinese menu --- doc/.NETMemoryPerformanceAnalysis.zh-CN.md | 56 ++++++++++------------ 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/doc/.NETMemoryPerformanceAnalysis.zh-CN.md b/doc/.NETMemoryPerformanceAnalysis.zh-CN.md index ebdeda0..0a42337 100644 --- a/doc/.NETMemoryPerformanceAnalysis.zh-CN.md +++ b/doc/.NETMemoryPerformanceAnalysis.zh-CN.md @@ -74,29 +74,28 @@ :black_medium_square:[GC 基础](#GC基础) -:black_small_square:[了解 GC 堆内存的使用与进程/机器内存的使用情况](#了解GC堆内存的使用与进程机器内存的使用情况) +- [了解 GC 堆内存的使用与进程/机器内存的使用情况](#了解GC堆内存的使用与进程机器内存的使用情况) -- [GC 堆只是你进程中的一种内存使用情况](#GC堆只是你进程中的一种内存使用情况) + - [GC 堆只是你进程中的一种内存使用情况](#GC堆只是你进程中的一种内存使用情况) -- [GC 是按进程进行的,但它知道机器上的物理内存负载](#GC是按进程进行的但它知道机器上的物理内存负载) + - [GC 是按进程进行的,但它知道机器上的物理内存负载](#GC是按进程进行的但它知道机器上的物理内存负载) -:black_small_square:[了解 GC 是如何被触发的](#了解GC是如何被触发的) +- [了解 GC 是如何被触发的](#了解GC是如何被触发的) -- [触发 GC 的主要原因是分配](#触发GC的主要原因是分配) -- [触发 GC 的其他因素](#触发GC的其他因素) + - [触发 GC 的主要原因是分配](#触发GC的主要原因是分配) + - [触发 GC 的其他因素](#触发GC的其他因素) -:black_small_square:[了解分配内存的成本](#了解分配内存的成本) +- [了解分配内存的成本](#了解分配内存的成本) -:black_small_square:[如何正确看待 GC 堆的大小](#如何正确看待GC堆的大小) +- [如何正确看待 GC 堆的大小](#如何正确看待GC堆的大小) + - [看一下 GC 堆的大小与 GC 发生的时间关系](#看一下GC堆的大小与GC发生的时间关系) + - [分配预算](#分配预算) + - [分代 GC 的影响](#分代GC的影响) + - [碎片化(自由对象)是堆大小的一部分](#碎片化自由对象是堆大小的一部分) + - [GC 自己的记账](#GC自己的记账) + - [什么时候 GC 会抛出一个OOM异常?](#什么时候GC会抛出一个OOM异常) -- [看一下 GC 堆的大小与 GC 发生的时间关系](#看一下GC堆的大小与GC发生的时间关系) -- [分配预算](#分配预算) -- [分代 GC 的影响](#分代GC的影响) -- [碎片化(自由对象)是堆大小的一部分](#碎片化自由对象是堆大小的一部分) -- [GC 自己的记账](#GC自己的记账) -- [什么时候 GC 会抛出一个OOM异常?](#什么时候GC会抛出一个OOM异常) - -:black_small_square:[了解 GC 暂停-即何时触发 GC 以及 GC 持续多长时间)](#了解GC暂停即何时触发GC以及GC持续多长时间) +- [了解 GC 暂停-即何时触发 GC 以及 GC 持续多长时间)](#了解GC暂停即何时触发GC以及GC持续多长时间) - [单个 GC 的持续时间](#单个GC的持续时间) @@ -140,23 +139,16 @@ :black_medium_square:[GC 暂停时间百分比高](#GC暂停时间百分比高) -:black_small_square:[太多的停顿,即太多的 GC](#太多的停顿即太多的GC) - -- [测量分配](#测量分配) - -- [理解为什么 GC 决定收集这一代](#理解为什么GC决定收集这一代) - -:black_small_square:[个别的长时间停顿](#个别的长时间停顿) - -- [首先,您是否存在托管内存泄漏?](#首先您是否存在托管内存泄漏) - -- [长时间的停顿是由于短暂的 GCs、完全阻塞的 GCs 还是 BGCs?](#长时间的停顿是由于短暂的GCs完全阻塞的GCs还是BGCs) - -- [计算出 gen2 GC 的工作量](#计算出gen2-GC的工作量) - -- [计算出短暂 GC 的工作量](#计算出短暂GC的工作量) +- [太多的停顿,即太多的 GC](#太多的停顿即太多的GC) + - [测量分配](#测量分配) + - [理解为什么 GC 决定收集这一代](#理解为什么GC决定收集这一代) -- [弄清楚长的 GC 是否是由于 GC 工作造成的](#弄清楚长的GC是否是由于GC工作造成的) +- [个别的长时间停顿](#个别的长时间停顿) + - [首先,您是否存在托管内存泄漏?](#首先您是否存在托管内存泄漏) + - [长时间的停顿是由于短暂的 GCs、完全阻塞的 GCs 还是 BGCs?](#长时间的停顿是由于短暂的GCs完全阻塞的GCs还是BGCs) + - [计算出 gen2 GC 的工作量](#计算出gen2-GC的工作量) + - [计算出短暂 GC 的工作量](#计算出短暂GC的工作量) + - [弄清楚长的 GC 是否是由于 GC 工作造成的](#弄清楚长的GC是否是由于GC工作造成的) :black_medium_square:[大尺寸的 GC 堆](#大尺寸的GC堆) From 0dc74d84fe216689cf1f9edb4953467c056aab8c Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:56:36 -0800 Subject: [PATCH 6/9] Add spacing to the investigation section --- doc/.NETMemoryPerformanceAnalysis.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index 1a0809c..84704d7 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -125,22 +125,35 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[High % Pause time in GC](#High--Pause-time-in-GC) - [Too many pauses, ie, too many GCs](#Too-many-pauses-ie-too-many-GCs) + - [Measure allocations](#Measure-allocations) + - [How to see why a GC decided to collect a generation](#How-to-see-why-a-GC-decided-to-collect-a-generation) - [Long individual pauses](#Long-individual-pauses) + - [First of all, do you have a managed memory leak?](#First-of-all-do-you-have-a-managed-memory-leak) + - [Are the long pauses due to ephemeral GCs, full blocking GCs or BGCs?](#Are-the-long-pauses-due-to-ephemeral-GCs-full-blocking-GCs-or-BGCs) + - [Figuring out the amount of work for gen2 GCs](#Figuring-out-the-amount-of-work-for-gen2-GCs) + - [Figuring out the amount of work for ephemeral GCs](#Figuring-out-the-amount-of-work-for-ephemeral-GCs) + - [Figuring out if the long GCs are due to GC work or not](#Figuring-out-if-the-long-GCs-are-due-to-GC-work-or-not) :black_medium_square:[Large GC heap size](#Large-GC-heap-size) + - [Debugging OOM](#Debugging-OOM) + - [Is the Peak size too large but the After size is not?](#Is-the-Peak-size-too-large-but-the-After-size-is-not) + - [Is the After size too large?](#Is-the-After-size-too-large) + - [Are you doing mostly BGCs for gen2 GCs?](#Are-you-doing-mostly-BGCs-for-gen2-GCs) + - [Are you seeing a heap size that makes sense from GC’s POV, but still wanting to have a smaller heap?](#Are-you-seeing-a-heap-size-that-makes-sense-from-GCs-POV-but-still-wanting-to-have-a-smaller-heap) + - [Is GC using too much memory for its own bookkeeping?](#Is-GC-using-too-much-memory-for-its-own-bookkeeping) **[Definitive signs of perf problems](#definitive-signs-of-perf-problems)** From 3aa390d2480cad7013da9ebb6f54053120ad3d41 Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:57:08 -0800 Subject: [PATCH 7/9] Added spaces to the GC fundamentals --- doc/.NETMemoryPerformanceAnalysis.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index 84704d7..2a225cf 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -90,14 +90,23 @@ When I was writing this document I intended to introduce concepts like concurren - [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) - [Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) + - [How long an individual GC lasts](#How-long-an-individual-GC-lasts) + - [How often GCs are triggered](#How-often-GCs-are-triggered) + - [The one rule to remember](#The-one-rule-to-remember) + - [What makes an object survive](#What-makes-an-object-survive) + - [1. The generational aspect](#1-The-generational-aspect) + - [2. User roots](#2-User-roots) + - [3. managed memory leaks](#3-managed-memory-leaks) + - [“Mainline GC scenario” vs “not mainline”](#Mainline-GC-scenario-vs-not-mainline) + - [Part of the GC pause that’s not doing GC at all – thread suspension](#Part-of-the-GC-pause-thats-not-doing-GC-at-all-–-thread-suspension) **[Know when to worry](#Know-when-to-worry)** From a0f8077b82fa434288d1e696fbab100b7467a39b Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 12:57:44 -0800 Subject: [PATCH 8/9] Added more spaces for readability --- doc/.NETMemoryPerformanceAnalysis.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/.NETMemoryPerformanceAnalysis.md b/doc/.NETMemoryPerformanceAnalysis.md index 2a225cf..b8a2ea9 100644 --- a/doc/.NETMemoryPerformanceAnalysis.md +++ b/doc/.NETMemoryPerformanceAnalysis.md @@ -74,19 +74,31 @@ When I was writing this document I intended to introduce concepts like concurren :black_medium_square:[GC fundamentals](#GC-Fundamentals) - [Understanding the GC heap memory usage vs the process/machine memory usage](#Understanding-the-GC-heap-memory-usage-vs-the-processmachine-memory-usage) + - [GC heap is only one kind of memory usage in your process](#GC-heap-is-only-one-kind-of-memory-usage-in-your-process) + - [GC is per process but is aware of physical memory load on the machine](#GC-is-per-process-but-is-aware-of-physical-memory-load-on-the-machine) - [Understanding how GCs are triggered](#Understanding-how-GCs-are-triggered) + - [GCs are triggered mostly due to allocations](#GCs-are-triggered-mostly-due-to-allocations) + - [Other factors that would trigger GCs](#Other-factors-that-would-trigger-GCs) + - [Understanding cost of allocations](#Understanding-cost-of-allocations) + - [How to look at the GC heap size properly](#How-to-look-at-the-GC-heap-size-properly) + - [Looking at the GC heap size wrt when GCs happen](#Looking-at-the-GC-heap-size-wrt-when-GCs-happen) + - [The allocation budget](#The-allocation-budget) + - [The effect of a generational GC](#The-effect-of-a-generational-GC) + - [Fragmentation (free objects) is part of the heap size](#Fragmentation-free-objects-is-part-of-the-heap-size) + - [GC's own bookkeeping](#GCs-own-bookkeeping) + - [When would GC throw an OOM exception?](#When-would-GC-throw-an-OOM-exception) - [Understanding GC pauses, ie, when GCs are triggered and how long a GC lasts](#Understanding-GC-pauses-ie-when-GCs-are-triggered-and-how-long-a-GC-lasts) From 39202e20ff4cd654e2bb50e2ac3f57fab71e9fbe Mon Sep 17 00:00:00 2001 From: mrsharm Date: Sun, 18 Feb 2024 13:01:10 -0800 Subject: [PATCH 9/9] Fixed chinese menu --- doc/.NETMemoryPerformanceAnalysis.zh-CN.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/.NETMemoryPerformanceAnalysis.zh-CN.md b/doc/.NETMemoryPerformanceAnalysis.zh-CN.md index 0a42337..e4d45ff 100644 --- a/doc/.NETMemoryPerformanceAnalysis.zh-CN.md +++ b/doc/.NETMemoryPerformanceAnalysis.zh-CN.md @@ -83,16 +83,23 @@ - [了解 GC 是如何被触发的](#了解GC是如何被触发的) - [触发 GC 的主要原因是分配](#触发GC的主要原因是分配) + - [触发 GC 的其他因素](#触发GC的其他因素) - [了解分配内存的成本](#了解分配内存的成本) - [如何正确看待 GC 堆的大小](#如何正确看待GC堆的大小) + - [看一下 GC 堆的大小与 GC 发生的时间关系](#看一下GC堆的大小与GC发生的时间关系) + - [分配预算](#分配预算) + - [分代 GC 的影响](#分代GC的影响) + - [碎片化(自由对象)是堆大小的一部分](#碎片化自由对象是堆大小的一部分) + - [GC 自己的记账](#GC自己的记账) + - [什么时候 GC 会抛出一个OOM异常?](#什么时候GC会抛出一个OOM异常) - [了解 GC 暂停-即何时触发 GC 以及 GC 持续多长时间)](#了解GC暂停即何时触发GC以及GC持续多长时间) @@ -140,23 +147,35 @@ :black_medium_square:[GC 暂停时间百分比高](#GC暂停时间百分比高) - [太多的停顿,即太多的 GC](#太多的停顿即太多的GC) + - [测量分配](#测量分配) + - [理解为什么 GC 决定收集这一代](#理解为什么GC决定收集这一代) - [个别的长时间停顿](#个别的长时间停顿) + - [首先,您是否存在托管内存泄漏?](#首先您是否存在托管内存泄漏) + - [长时间的停顿是由于短暂的 GCs、完全阻塞的 GCs 还是 BGCs?](#长时间的停顿是由于短暂的GCs完全阻塞的GCs还是BGCs) + - [计算出 gen2 GC 的工作量](#计算出gen2-GC的工作量) + - [计算出短暂 GC 的工作量](#计算出短暂GC的工作量) + - [弄清楚长的 GC 是否是由于 GC 工作造成的](#弄清楚长的GC是否是由于GC工作造成的) :black_medium_square:[大尺寸的 GC 堆](#大尺寸的GC堆) - [调试 OOM](#调试OOM) + - [峰值尺寸太大,但 GC 后尺寸不大?](#峰值尺寸太大但GC后尺寸不大) + - [GC 后尺寸很大?](#GC后尺寸很大) + - [gen2 GC 是否主要为后台 GC?](#gen2-GC是否主要为后台GC) + - [你看到的堆的大小从 GC 的角度来看是合理的,但仍然希望有一个更小的堆?](#你看到的堆的大小从GC的角度来看是合理的但仍然希望有一个更小的堆) + - [GC 是否为自己的记账工作使用了太多的内存?](#GC是否为自己的记账工作使用了太多的内存) **[性能问题的明确迹象](#性能问题的明确迹象)**