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

Reasons for frequent Full GC

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

Share

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

Trigger Full GC. Please refer to https://blog.51cto.com/11009785/2399498

Reasons for frequent Full GC:

1. The space of the older generation is relatively small.

Solution: first, increase the space of the older generation. Second: use CMS GC to recycle the older generation to reduce the probability of full gc.

two。 System.gc () was called

Solution:-XX:+DisableExplicitGC ignores the manual call to GC, and the call to System.gc () becomes an air conditioner without triggering GC at all.

Note:

How do you locate the code that calls System.gc ()?

If the frequent Full GC,jstack thread stack is caused by System.gc (), you should see some information.

Jstack: view thread stack information within a Java process

Jstack can navigate to the thread stack, and we can navigate to specific code based on stack information, so it is used a lot in JVM performance tuning.

Note 1: in the information displayed, focus on the code written by yourself, and take screenshots for the developer.

Note 2: it is possible that jstack cannot capture the required information at one time, so it needs to be executed multiple times, because it captures the state of that moment.

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