Some good explanation from gc-heap-stats package:
-
total_heap_size: Number of bytes V8 has allocated for the heap. This can grow if usedHeap needs more.
-
used_heap_size: Number of bytes in used by application data
-
total_heap_size_executable: Number of bytes for compiled bytecode and JITed code
-
heap_size_limit: The absolute limit the heap cannot exceed (default limit or --max_old_space_size)
-
total_physical_size: Committed size
From Node.JS docs:
-
does_zap_garbage is a 0/1 boolean, which signifies whether the --zap_code_space option is enabled or not. This makes V8 overwrite heap garbage with a bit pattern. The RSS footprint (resident memory set) gets bigger because it continuously touches all heap pages and that makes them less likely to get swapped out by the operating system.
Self descriptive:
-
total_available_size: Available heap size
-
malloced_memory: current amount of memory, obtained via malloc
-
peak_malloced_memory: peak amount of memory, obtained via malloc
npm memwatch의 leak value 단위도 소스를 보면 v8 엔진을 사용하기 때문에 byte인걸 알 수 있습니다.
https://stackoverflow.com/questions/41541843/nodejs-v8-getheapstatistics-method
'Programming > JavaScript & TypeScript' 카테고리의 다른 글
ECMAScript 2020 (0) | 2020.09.10 |
---|---|
[Javascript VS Typescript] 자바스크립트와 타입스크립트 중 뭐가 더 좋을까 (0) | 2020.09.10 |
[NPM SQLite3] statement의 run 쿼리 error handling 방법 (0) | 2020.08.25 |
[NPM] forever 모듈 자체 로그 파일 생성하지 않음 (0) | 2020.07.29 |
[NPM] forever 모듈로 노드 서버 실행 시 메모리 사이즈(max-old-space-size) 설정하기 : forever start --max-old-space-size (0) | 2020.07.17 |