“This is the 21st day of my participation in the August Text Challenge.

🔉 introduction

I stole a lazy front, because Friday that day is really too tired, the next Friday owe to fill up, or I this jerry-built heart I feel bad 😃, today we continue to introduce one by one: the garbage collector did not mention before. If you want to see [up], you can click on [Portal].

⭐️ Classic garbage collector

Parallel avenge

The Parallel collector is based on the mark-copy algorithm and is insane. The Parallel collector is insane. The Parallel collector is insane. Just like us ordinary people if there is no difference with others, then why should others remember you?

throughput

The CMS garbage collector is focused on timing, reducing thread pause times, but the Parallel Insane collector is focused on achieving controlled throughput. What is throughput? We can think of it as: the number of tasks that can be processed per unit of time. So how do we measure this at the CPU level? You need to know the components of CPU consumption time. There are two main components:

  • The time to run user code
  • Time to run garbage collection

So if we can make sure that the garbage collection time is small enough like 1%, then we can say that the throughput is 99%. The formula is as follows:


TeX throughput : The time to run user code / The time to run user code + Time to run garbage collection \TeX throughput: time to run user code/time to run user code + time to run garbage collection

So what’s the point of high throughput? The main idea is to make the most of the processor’s resources to accomplish the task of running the program, which is well understood and not explained.

parameter

The Parallel Scavenge avenge can control the insane. How do I control it? The Parallel Insane collector gives us two parameters to do this:

  • Set the maximum garbage collection pause time- XX: MaxGCPauseMillis
  • Set the throughput size directly:- XX: GCTimeRatio

So what does the parameter value mean? How does that work? -xx: MaxGCPauseMillis allows the number of milliseconds greater than 0. Does the smaller the value, the shorter the garbage collection pause time? Of course not, but what are the effects of shorter garbage collection pauses? The Parallel Scavenge avenge is designed to be insane for the new generation, and when you downsize the Insane, the pauses per garbage collection will be shorter. As a result of the low memory, the garbage collection will be more frequent, and the pauses will decrease as well as the throughput.

-xx: GCTimeRatio (Ratio) -xx: GCTimeRatio (Ratio) -xx: GCTimeRatio (Ratio)

The Parallel Exploiture collector uses -xx: +UseAdaptiveSizePolicy as a switch parameter. Once you open the Pandora’s box, the virtual machine dynamically adjusts parameters based on application performance and monitoring information to ensure optimal throughput and pause times. This is also called adaptive garbage collection strategy 😎 (Gergonomics).

📝 digression

I firmly believe that the wealth of the world cannot advance human progress, even if it is in the hands of those who still want to achieve it. It is only by following the example of great and pure men that noble thoughts and actions can be produced. Money can only breed selfishness and make it impossible to abuse.

Who could have imagined Moses, Jesus or Gandhi as rich as Carnegie?

Loudly tell me: the next richest man in the world is not you 😛?