Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Why does GC cause the number of threads to decrease?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains why GC leads to a reduction in the number of threads. The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn why GC leads to a reduction in the number of threads.

Doubt

Recently received some alarms, is the method performance alarm, the location reason is mainly caused by the sudden increase in instantaneous flow, but the performance of the query MySQL in the observation method is not poor, where is the performance cost? At the same time, by observing the performance of JVM, it is found that there are more YoungGC and higher utilization of CPU, but the number of threads decreases at the same time. YoungGC will create new threads for garbage collection. The number of threads should increase, why does it decrease?

Thinking

Consider the application scenario of the existing system. If it is a gateway system, frequent Young GC and Full GC will certainly affect the caller's request when stop-the-world occurs. In extreme cases, 502will occur. Therefore, when designing the system, we should try to reduce Young GC and Full GC.

Thank you for your reading, the above is the content of "why GC leads to a reduction in the number of threads". After the study of this article, I believe you have a deeper understanding of why GC leads to a reduction in the number of threads. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report