我们在12核IBM机器上的RedHat Linux 5.2上运行了JBoss 4.2.3中的webapp . 最近我们看到了很长的响应时间,这似乎是GC活动造成的 . 模式或多或少如下:所有请求似乎都以正常速率发送,但是在突然所有响应都被“刷新”之前不会发送任何字节 . 同时gc.log具有以下模式:
// Here the unresponsiveness starts
36788.309: [GC [1 CMS-initial-mark: 1919297K(4456448K)] 1969797K(5111808K), 0.1473460 secs] [Times: user=0.15 sys=0.00, real=0.15 secs]
Total time for which application threads were stopped: 0.1530790 seconds
36788.457: [CMS-concurrent-mark-start]
36793.886: [CMS-concurrent-mark: 5.429/5.429 secs] (CMS-concurrent-mark yielded 46 times)
[Times: user=6.69 sys=0.07, real=5.43 secs]
36793.886: [CMS-concurrent-preclean-start]
(cardTable: 15956 cards, re-scanned 15956 cards, 1 iterations)
36793.988: [CMS-concurrent-preclean: 0.089/0.101 secs] (CMS-concurrent-preclean yielded 9 times)
[Times: user=0.12 sys=0.01, real=0.10 secs]
36793.988: [CMS-concurrent-abortable-preclean-start]
(cardTable: 75 cards, re-scanned 75 cards, 1 iterations)
Application time: 5.6923460 seconds
Total time for which application threads were stopped: 0.0170000 seconds
(cardTable: 96 cards, re-scanned 96 cards, 1 iterations)
(cardTable: 207 cards, re-scanned 207 cards, 1 iterations)
(cardTable: 45 cards, re-scanned 45 cards, 1 iterations)
(cardTable: 157 cards, re-scanned 157 cards, 1 iterations)
(cardTable: 88 cards, re-scanned 88 cards, 1 iterations)
(cardTable: 213 cards, re-scanned 213 cards, 1 iterations)
(cardTable: 84 cards, re-scanned 84 cards, 1 ite