Giter Club home page Giter Club logo

Comments (3)

sendaoYan avatar sendaoYan commented on June 26, 2024

一直频繁gc:
image

from dragonwell8.

sendaoYan avatar sendaoYan commented on June 26, 2024

打开gc之后的复现日志:

gc.log
tone_specjbb2015_jdk11_default.log
tone_specjbb2015_jdk11_default.log.zip

from dragonwell8.

sendaoYan avatar sendaoYan commented on June 26, 2024

打开gc日志重新运行,前两次运行正常,第3次运行长时间未结束。gc日志显示连续5个小时一直在做老年代的内存回收。老年代的内存使用率5242542K/5242880K=99.99%,基本上经过8次fullgc才能回收1K内存(5242543K->5242542K,每次fuzzgc的时间大概是3s左右),差不多30s才能回收1k的老年代内存。
SPECjbb2015启动的jvm选项包含了-XX:ObjectAlignmentInBytes=32选项,该参数默认值是8,改为32之后导致对象对齐变大,进而导致老年代内存使用紧张,直至达到临界值,SPECjbb2015运行时频繁触发fullgc且内存回收效果有限。JDK8版本使用-XX:ObjectAlignmentInBytes=32参数的话,建议在JVM堆内存在100G或者以上才配置该选项。
至于该问题随机出现的原因,可能是跟老年代的内存碎片化程度有关系。正常跑完的时候,老年代的堆内存分布比较集中;长时间跑不完的时候,内存碎片问题严重。

建议:

  1. 该性能测试,可能会在各种不同的ecs规格上运行,比如2x、4x、8x、16x等规格,建议JVM选项尽量使用默认选项。-Dspecjbb.customerDriver.threads=64改成默认值;-XX:MaxTenuringThreshold=15改成默认值;-XX:ParallelGCThreads=80配置成系统核数,或者使用JVM默认值;-XX:ObjectAlignmentInBytes=32改成默认值,在小堆情况下不建议配置该参数
  2. 打开UsePerfData选项,方便出现问题的时候登录环境查找原因
  3. 测试时打开gc日志,并将gc日志重定向到文件。在测试完成时,使用tone的接口upload_testlogs将gc日志上传到T-one。方便查看正常运行、非正常运行的日志及日志对比。SPECjbb是计算密集型和内存读写密集型性能测试,对IO不敏感,增加gc日志不影响性能跑分

gc.log

from dragonwell8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.