In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the JVM garbage collection algorithm example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
A new generation of JVM garbage collection algorithm
Bottleneck of JVM garbage collection
The traditional generation-by-generation JVM garbage collection method has minimized the burden of JVM garbage collection on applications to a certain extent, and pushed the application throughput to a limit. But one problem he can't solve is the app pause caused by FullGC. In some application scenarios with high real-time requirements, the request accumulation and request failure caused by GC pause are unacceptable. Such applications may require the return time of the request to be within hundreds or even dozens of milliseconds. If generational JVM garbage collection is to achieve this goal, the setting of the * heap can only be limited to a relatively small range, but this limits the processing capacity of the application itself and is also unacceptable.
Generational JVM garbage collection does take into account the real-time requirements and provides a concurrent collector, which supports the setting of * pausing time. However, due to the memory partition model of generational JVM garbage collection, its effect is not very satisfactory.
In order to meet the real-time requirements (in fact, the original design of Java language is also on the embedded system), a new JVM garbage collection method is coming out, which supports not only short pause time, but also large memory space allocation. It can well solve the problems caused by the traditional generation method.
The evolution of incremental collection
The way of incremental collection can theoretically solve the problems caused by the traditional generation method. Incremental collection divides the heap space into a series of memory blocks, and when using it, use some of them first (not all of them will be used up), and then put the surviving objects in the previously used parts into the later useless space during garbage collection. this can achieve the effect of collecting while using all the time, avoiding the situation of collection paused after the whole use of the traditional generation method.
Of course, the traditional generation-by-generation collection method also provides concurrent collection, but it has a very fatal place, that is, it treats the whole heap as a block of memory, which on the one hand causes fragments (which cannot be compressed). On the other hand, each collection is a collection of the entire heap, unable to make a choice, and the control of pause time is still very weak. In the incremental way, the above problem can be solved by dividing the memory space into blocks.
Thank you for reading this article carefully. I hope the article "sample Analysis of JVM garbage Collection algorithm" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.