我们有一个批处理作业,它从数据库读取数据并将其写入文件。作业是在Spring 2.8之上编写的。我们已经注意到,它占用了大量的内存,并试图调整它。我在做练习时有一些问题。
环境细节
Number of cores: 2
OS: Red Hat Enterprise Linux Server release 6.5
Total Physical Memory: 7.69GB
JVM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08) for linux-amd64 JRE (1.7.0_45-b18)
JVM Command Line Arguments: -Xloggc:../logs/Job-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:-PrintTenuringDistribution -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5M -XX:-CITime -XX:-PrintClassHistogram -XX:-PrintConcurrentLocks -XX:-PrintAdaptiveSizePolicy -XX:-TraceClassLoading -XX:-TraceClassUnloading -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=server.com
Garbage Collector used (this info is from JMC): ParallelScavenge for Young and ParallelOld for Old.发布于 2019-01-23 08:44:24
我知道内存转储会显示这一点,但有时文件太大,无法从活动系统传输到本地机器并执行诊断。
命令tar -czf dump.tar.gz dump.hprof可以帮助您传输那个大文件。
3GB -> 100 3GB。
转储文件的压缩速率会非常高。
https://stackoverflow.com/questions/27961908
复制相似问题