2017-10-10 15 views
1

cAdvisor는 Prometheus에서 사용하는 메모리가 14GB 인 경우 상위 6.xGB를보고합니다.Cadvisor의 컨테이너 메모리 사용에 대한 잘못된보고

누군가가 왜 이러한 불일치를 설명 할 수 있습니까? 나는 그것이 가상 메모리 크기의 가정 -

는 container_memory_usage_bytes의 documentatation는

Current memory usage in bytes, including all memory regardless of when it was accessed 

를 말한다 그러나이가 참조 무엇인지 명확하지 않다? cAdvisor에 의해 보도 된 바와 같이

: 호스트 시스템에서 최고에 의해 보도 된 바와 같이

[email protected] ~ $ curl -q localhost:4194/metrics | grep container_memory_usage_bytes | grep prometheus 
container_memory_usage_bytes{container_name="prometheus",id="/docker/d37e7503309e632265cb834095efa949da4dc3c72122cb290e626f1121d0ed6b",image="quay.io/prometheus/prometheus:v1.7.1",name="k8s_prometheus.71f5f8c6_prometheus-zwvhx_xx-system_9753de21-aaac-11e7-97e5-026a05f72f78_4682ea0b",namespace="xx-system",pod_name="prometheus-zwvhx"} 1.4178545664e+10 

: 토론 here

Tasks: 272 total, 1 running, 271 sleeping, 0 stopped, 0 zombie 
%Cpu(s): 20.2 us, 2.7 sy, 0.0 ni, 75.9 id, 0.5 wa, 0.6 hi, 0.1 si, 0.0 st 
KiB Mem: 65964640 total, 64892592 used, 1072048 free, 5222520 buffers 
KiB Swap:  0 total,  0 used,  0 free. 4737420 cached Mem 

    PID USER  PR NI VIRT RES SHR S %CPU %MEM  TIME+ COMMAND                         
118446 root  20 0 6783108 6.154g 19864 S 316.7 9.8 8241:05 prometheus 
+0

네가 맞다. VIRT에는 RES가 포함되어있다. 나는 대답에서이 간단한 실수를했다. 컨테이너에 다른 프로세스가있을 수 있습니까? –

답변

1

는 cAdvisor 바이트의 메모리 사용량을보고합니다.

귀하의 경우 1.4178545664e+10 Byte = 14.178545664 Gigabyte이보고되었습니다. e+10이므로 1.4G가 아닌 약 14G입니다.

+0

VIRT에 RES가 포함되어 있다고 생각했는데 그렇지 않습니까? 그리고, 나는 Prometheus에 의해보고 된 기억에 정정되었고, 나는 내 직책에서 그것을 편집했다. –