我们正在运行Solr 4.10并且看到非常高的响应时间:
avgRequestsPerSecond:2.5
5minRateReqsPerSecond:5.2
75thPcRequestTime:3.45
95thPcRequestTime:16.68
99thPcRequestTime:1366.22
999thPcRequestTime:3477.79
在运行jstat -gc
时,我发现OC和OU保持相等,而FGC
正在持续发生。这清楚地表明了Solr中的内存泄漏,对吧?我该如何进一步分析?
jstat -gc 32110 1s | awk '{print $3 "\t" $4 "\t" $6 "\t" $7 "\t" $8 "\t" $15 }'
S0U S1U EU OC OU FGC
0.0 0.0 6632870.9 12582912.0 12402105.3 29902
0.0 0.0 6684761.8 12582912.0 12402105.2 29902
0.0 0.0 6691460.8 12582912.0 12402105.2 29902
0.0 0.0 6694722.4 12582912.0 12402105.2 29903
0.0 0.0 6694725.9 12582912.0 12402105.2 29904
0.0 0.0 6695870.2 12582912.0 12402105.0 29904
0.0 0.0 6729501.5 12582912.0 12402105.0 29904
0.0 0.0 6732006.7 12582912.0 12402105.0 29906
0.0 0.0 6733112.6 12582912.0 12402103.8 29906
0.0 0.0 6741058.6 12582912.0 12402103.8 29906
0.0 0.0 6758686.3 12582912.0 12402103.8 29907
0.0 0.0 6759295.8 12582912.0 12402103.8 29908
0.0 0.0 6764812.4 12582912.0 12402103.6 29908
0.0 0.0 6915819.8 12582912.0 12402103.6 29908
0.0 0.0 6927843.8 12582912.0 12402103.6 29909
0.0 0.0 6936952.4 12582912.0 12402103.6 29910
0.0 0.0 6938582.2 12582912.0 12402027.2 29910
0.0 0.0 6965969.7 12582912.0 12402027.2 29910
0.0 0.0 6965969.7 12582912.0 12402027.2 29911
0.0 0.0 6966291.8 12582912.0 12402027.2 29912
0.0 0.0 7018558.7 12582912.0 12402026.6 29912
0.0 0.0 7021295.9 12582912.0 12402026.6 29912
0.0 0.0 7022254.9 12582912.0 12402026.6 29913
0.0 0.0 7064476.5 12582912.0 12402026.6 29914
0.0 0.0 7067874.0 12582912.0 12402026.4 29914
0.0 0.0 7070544.2 12582912.0 12402026.4 29914
0.0 0.0 7076188.2 12582912.0 12402026.4 29916
0.0 0.0 7076556.2 12582912.0 12402007.2 29916
0.0 0.0 7101610.3 12582912.0 12402007.2 29916
0.0 0.0 7156338.1 12582912.0 12402007.2 29917
0.0 0.0 7158966.6 12582912.0 12402007.2 29918
0.0 0.0 7172960.0 12582912.0 12402007.2 29918
0.0 0.0 7174184.7 12582912.0 12402007.2 29918
0.0 0.0 7278617.7 12582912.0 12402007.2 29919
0.0 0.0 7321347.9 12582912.0 12402007.2 29920
0.0 0.0 7473383.3 12582912.0 12401949.4 29920
0.0 0.0 7478629.0 12582912.0 12401949.4 29920
0.0 0.0 7560124.9 12582912.0 12401949.4 29921
0.0 0.0 7586431.8 12582912.0 12401949.4 29922
0.0 0.0 7587841.2 12582912.0 12401949.1 29922
0.0 0.0 7607755.4 12582912.0 12401949.1 29922
0.0 0.0 7656487.0 12582912.0 12401949.1 29923
0.0 0.0 7662770.1 12582912.0 12401949.1 29924
0.0 0.0 7662770.1 12582912.0 12401949.1 29924
0.0 0.0 7810619.5 12582912.0 12401908.7 29924
0.0 0.0 7915475.2 12582912.0 12401908.7 29924
0.0 0.0 7916589.7 12582912.0 12401908.7 29925
0.0 0.0 7923831.6 12582912.0 12401908.7 29926
0.0 0.0 7927085.1 12582912.0 12401836.2 29926
0.0 0.0 7947903.0 12582912.0 12401836.2 29926
0.0 0.0 7994024.6 12582912.0 12401836.2 29926
0.0 0.0 7994024.6 12582912.0 12401836.2 29927
0.0 0.0 8041582.5 12582912.0 12401836.2 29928
0.0 0.0 8057792.8 12582912.0 12401835.5 29928
0.0 0.0 8151537.0 12582912.0 12401835.5 29928
0.0 0.0 8151551.6 12582912.0 12401835.5 29929
0.0 0.0 8152414.2 12582912.0 12401835.5 29930
0.0 0.0 8159020.1 12582912.0 12401835.5 29930
0.0 0.0 8159020.1 12582912.0 12401834.4 29930
0.0 0.0 8169436.4 12582912.0 12401834.4 29930
0.0 0.0 8170238.0 12582912.0 12401834.4 29931
0.0 0.0 8172264.0 12582912.0 12401834.4 29932
0.0 0.0 8193949.3 12582912.0 12401796.7 29932
0.0 0.0 8194900.5 12582912.0 12401796.7 29932
0.0 0.0 8204694.2 12582912.0 12401796.7 29933
0.0 0.0 8207894.7 12582912.0 12401796.7 29934
0.0 0.0 8207894.7 12582912.0 12401796.7 29934
0.0 0.0 8224413.5 12582912.0 12401796.5 29934
0.0 0.0 8229298.6 12582912.0 12401796.5 29934
0.0 0.0 8233077.3 12582912.0 12401796.5 29935
0.0 0.0 8233100.2 12582912.0 12401796.5 29936
0.0 0.0 8291558.6 12582912.0 12401796.2 29936
0.0 0.0 8294201.9 12582912.0 12401796.2 29936
0.0 0.0 8376223.8 12582912.0 12401796.2 29937
0.0 0.0 8376223.8 12582912.0 12401796.2 29937
0.0 0.0 8430118.2 12582912.0 12401796.2 29938
0.0 0.0 8434741.0 12582912.0 12401710.7 29938
0.0 0.0 8526729.6 12582912.0 12401710.7 29938
0.0 0.0 8555110.4 12582912.0 12401710.7 29939
0.0 0.0 8579409.8 12582912.0 12401710.7 29940
0.0 0.0 8579409.8 12582912.0 12401710.7 29940
0.0 0.0 8695038.1 12582912.0 12401643.6 29940
0.0 0.0 8696711.3 12582912.0 12401643.6 29940
0.0 0.0 8696711.3 12582912.0 12401643.6 29941
0.0 0.0 8737284.3 12582912.0 12401643.6 29942
0.0 0.0 8737284.3 12582912.0 12401643.6 29942
0.0 0.0 8772882.9 12582912.0 12401642.1 29942
0.0 0.0 8775170.0 12582912.0 12401642.1 29942
0.0 0.0 8775170.0 12582912.0 12401642.1 29943
0.0 0.0 8794554.3 12582912.0 12401642.1 29944
0.0 0.0 8794767.2 12582912.0 12401642.1 29944
0.0 0.0 8824500.6 12582912.0 12401581.8 29944
0.0 0.0 8826083.6 12582912.0 12401581.8 29944
0.0 0.0 8826083.6 12582912.0 12401581.8 29945
0.0 0.0 8911554.7 12582912.0 12401581.8 29946
0.0 0.0 8911554.7 12582912.0 12401581.8 29946
0.0 0.0 8958907.7 12582912.0 12401467.2 29946
0.0 0.0 8959676.5 12582912.0 12401467.2 29946
0.0 0.0 8959676.5 12582912.0 12401467.2 29947
0.0 0.0 8964523.1 12582912.0 12401467.2 29948
0.0 0.0 8964523.1 12582912.0 12401467.2 29948
0.0 0.0 8987262.5 12582912.0 12401467.2 29948
0.0 0.0 8992354.3 12582912.0 12401467.2 29948
0.0 0.0 8992354.3 12582912.0 12401467.2 29949
0.0 0.0 8993935.5 12582912.0 12401467.2 29950
0.0 0.0 8993935.5 12582912.0 12401467.2 29950
0.0 0.0 9004951.2 12582912.0 12401466.4 29950
0.0 0.0 9014431.4 12582912.0 12401466.4 29950
0.0 0.0 9014431.4 12582912.0 12401466.4 29951
以下是我的JVM参数:
-Xloggc:tomcat7/logs/gc.log
-Xmx24g
-Xms24g
-XX:+UseConcMarkSweepGC
-XX:MaxPermSize=256m
-XX:MaxNewSize=12G
-XX:NewSize=12G
-XX:SurvivorRatio=6
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=80
-XX:TargetSurvivorRatio=80
-XX:MaxTenuringThreshold=8
-XX:+UseConcMarkSweepGC
-XX:+CMSScavengeBeforeRemark
-XX:PretenureSizeThreshold=512m
-XX:CMSFullGCsBeforeCompaction=1
-XX:CMSTriggerPermRatio=80
-XX:CMSMaxAbortablePrecleanTime=6000
-XX:+CMSConcurrentMTEnabled
-XX:+UseParNewGC
-XX:ConcGCThreads=6
-XX:ParallelGCThreads=6
-XX:+UseLargePages
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintHeapAtGC
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution
-XX:ThreadStackSize=256
答案 0 :(得分:0)
除了Solr使用大量内存之外,您无法从这些有限的数据中推断出任何内容。在jstat输出结尾处使用的总内存(加上EU和OU)仅显示正在使用的20.7GB主堆。如果我们假设其他内存池具有典型大小,则Java使用的总内存可能略小于22GB,至少留下2GB尚未分配的堆。
您是否在日志中遇到OutOfMemoryError?这个Solr实例正在处理的索引有哪些统计数据 - 文档数,已删除文档数,索引大小等?您需要有关垃圾收集的长期信息,以确定是否存在内存泄漏。
在Solr中,内存泄漏极为罕见,我在最近的历史中并不知道。