场景: 生产环境k8s 容器 jdk 版本为 OpenJDK 1.8 程序部署启动时 出现如下的警告信息:

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

解决方案:

内因: 

As described in JEP 248, in JDK 9 the default garbage collector will switch from Parallel Garbage Collector (Parallel GC) to G1 Garbage Collector (G1GC).

启动时加入 -XX:ParallelGCThreads=N  参数 

 

 

 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐