[GC] CMS-concurrent GC Log Term 설명
Sample 예제
1682127.667: [GC [1 CMS-initial-mark: 4198606K(4562944K)] 4336629K(6590464K), 10.9210640 secs] [Times: user=0.28 sys=0.07, real=10.92 secs] |
CMS Concurrent GC Log 내용에 대한 자그만한 정리.
기본적으로 Serial GC와 CMS GC의 Policy가 다르기 때문에 쌓이는 로그 모습도 매우 다르다. 실시간적으로 GC 대상을 mark하고clean을 하는 CMS GC의 sample은 위의 예제와 같다.
CMS-initial-mark -> CMS-concurrent-mark-start -> CMS-concurrent-mark -> CMS-concurrent-preclean-start -> CMS-concurrent-preclean (-->CMS-concurrent-abortable-preclean-start ( 시간이 오래걸릴경우 중간에 정지됨 )
이 로그를 Sample로 잡은 이유가 있다.
이 로그를 잘 보면, user/sys 시간은 굉장히 짧은데 real 시간이 상대적이 매우 길다. 그럼 과연 각각의 의미는 무엇일까?
======================================================================================
user = This is only actual CPU time used in executing the process
sys = CPU time spent in system calls within the kernel
real = wall clock time.
In detail, The time should generally be similar to the sys+user time but if the process is blocked or waiting then it would be higher. For example) I/O, blocked CPU and swapping.
======================================================================================
다시 말하면, user/sys 시간이 짧다면 real도 시간이 그리 크게 차이가 나면 안되는 것이다. 그리고 CPU에서 처리하는 시간은 짧은 데 I/O나 CPU block 시간이 길다는 이야기이다. 보통 이럴경우에는 물리 메모리가 부족해서 swapping이 일어나거나 당시에 CPU usage가 치솟았는지를 확인해봐야한다.