简体   繁体   English

减少垃圾收集的暂停

[英]reduce pause in garbage collection

I think I've got a problem with the configuration of the garbage collection. 我认为垃圾收集的配置存在问题。 The Server use a jetty with structr (neo4j) and after a few requests the server stands still because of the garbage collection. 服务器使用带有structr(neo4j)的码头,并在几次请求后由于垃圾收集而使服务器保持静止。

My server has 8 cores and 48gb ram 我的服务器有8核和48GB内存

I start the application with this parameters 我使用此参数启动应用程序

"-server -d64 -Xms20g -Xmx20g -XX:MaxPermSize=512m -XX:+UseNUMA -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:MaxNewSize=8g" “-服务器-d64 -Xms20g -Xmx20g -XX:MaxPermSize = 512m -XX:+ UseNUMA -XX:+ UseConcMarkSweepGC -XX:+ DisableExplicitGC -XX:MaxNewSize = 8g”

Could you help me to find the right configuration for the gc? 您能帮我找到合适的gc配置吗? Do you need more informations? 您需要更多信息吗?

This shows the work of the gc and the heap of my application. 这显示了gc的工作和应用程序的堆。 (gcviewer) (gcviewer)

  • yellow - shows the young generation 黄色-显示年轻一代
  • red - shows the heap size 红色-显示堆大小
  • green - shows the gc time 绿色-显示gc时间
  • grey - shows the reserved young generation space 灰色-显示保留的年轻代空间
  • purple - shows the reserved heap 紫色-显示保留的堆

在此处输入图片说明

and after a few requests the server stands still because of the garbage collection. 几次请求后,服务器由于垃圾回收而保持静止。

green - shows the gc time 绿色-显示gc时间

Your image suggests otherwise, the green line shows sub-second pauses a few minutes after startup. 您的图像表明存在其他问题,绿线表示启动后几分钟会暂停几秒钟。

Either the perceived hangs are caused by something else or you should provide the whole GC log and indicate which particular GC occurrence you consider problematic. 感觉到的挂起是由其他原因引起的,或者您应该提供整个GC日志并指出您认为有问题的特定GC发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM