대시보드
서비스 상태
리소스 사용량
메모리 및 CPU
성능 저하메모리 또는 CPU 사용률이 할당된 메모리 또는 CPU에 근접하면 성능 저하가 발생할 수 있습니다. 이를 해결하기 위해 다음을 권장합니다.
- 쿼리 최적화
- 테이블 엔진의 파티셔닝 변경
- 스케일링을 사용해 서비스에 더 많은 컴퓨트 리소스 추가
| 그래프 | 해당 메트릭 이름 | 집계 | 참고 |
|---|---|---|---|
| 할당된 메모리 | CGroupMemoryTotal | 최대 | |
| 할당된 CPU | CGroupMaxCPU | 최대 | |
| 사용 중인 메모리 | MemoryResident | 최대 | |
| 사용 중인 CPU | 시스템 CPU 메트릭 | 최대 | Prometheus 엔드포인트를 통해 제공되는 ClickHouseServer_UsageCores |
데이터 전송
Advanced dashboard
ClickHouse Cloud는 이 대시보드에 표시되는 메트릭을 system table에서 스크레이프해 저장하므로, 서비스가 유휴 상태여도 확인할 수 있습니다. 이러한 메트릭에 액세스해도 기본 서비스에 쿼리가 실행되지 않으며, 유휴 상태의 서비스가 다시 활성화되지도 않습니다.
| 그래프 | 해당 ClickHouse 메트릭 이름 | System table | 집계 유형 |
|---|---|---|---|
| 쿼리/초 | ProfileEvent_Query | metric_log | 합계 / bucketSizeSeconds |
| 실행 중인 쿼리 | CurrentMetric_Query | metric_log | 평균 |
| 실행 중인 머지 | CurrentMetric_Merge | metric_log | 평균 |
| 선택된 바이트/초 | ProfileEvent_SelectedBytes | metric_log | 합계 / bucketSizeSeconds |
| IO 대기 | ProfileEvent_OSIOWaitMicroseconds | metric_log | 합계 / bucketSizeSeconds |
| S3 읽기 대기 | ProfileEvent_ReadBufferFromS3Microseconds | metric_log | 합계 / bucketSizeSeconds |
| S3 읽기 오류/초 | ProfileEvent_ReadBufferFromS3RequestsErrors | metric_log | 합계 / bucketSizeSeconds |
| CPU 대기 | ProfileEvent_OSCPUWaitMicroseconds | metric_log | 합계 / bucketSizeSeconds |
| OS CPU 사용량(사용자 공간, 정규화) | OSUserTimeNormalized | asynchronous_metric_log | |
| OS CPU 사용량(커널, 정규화) | OSSystemTimeNormalized | asynchronous_metric_log | |
| 디스크에서 읽기 | ProfileEvent_OSReadBytes | metric_log | 합계 / bucketSizeSeconds |
| 파일 시스템에서 읽기 | ProfileEvent_OSReadChars | metric_log | 합계 / bucketSizeSeconds |
| 메모리(추적됨, 바이트) | CurrentMetric_MemoryTracking | metric_log | |
| MergeTree 총 파트 수 | TotalPartsOfMergeTreeTables | asynchronous_metric_log | |
| 파티션별 최대 파트 수 | MaxPartCountForPartition | asynchronous_metric_log | |
| S3에서 읽기 | ProfileEvent_ReadBufferFromS3Bytes | metric_log | 합계 / bucketSizeSeconds |
| 파일 시스템 캐시 크기 | CurrentMetric_FilesystemCacheSize | metric_log | |
| Disk S3 쓰기 요청/초 | ProfileEvent_DiskS3PutObject + ProfileEvent_DiskS3UploadPart + ProfileEvent_DiskS3CreateMultipartUpload + ProfileEvent_DiskS3CompleteMultipartUpload | metric_log | 합계 / bucketSizeSeconds |
| Disk S3 읽기 요청/초 | ProfileEvent_DiskS3GetObject + ProfileEvent_DiskS3HeadObject + ProfileEvent_DiskS3ListObjects | metric_log | 합계 / bucketSizeSeconds |
| FS 캐시 적중률 | sum(ProfileEvent_CachedReadBufferReadFromCacheBytes) / (sum(ProfileEvent_CachedReadBufferReadFromCacheBytes) + sum(ProfileEvent_CachedReadBufferReadFromSourceBytes)) | metric_log | |
| 페이지 캐시 적중률 | greatest(0, (sum(ProfileEvent_OSReadChars) - sum(ProfileEvent_OSReadBytes)) / (sum(ProfileEvent_OSReadChars) + sum(ProfileEvent_ReadBufferFromS3Bytes))) | metric_log | |
| 네트워크 수신 바이트/초 | NetworkReceiveBytes | asynchronous_metric_log | 합계 / bucketSizeSeconds |
| 네트워크 송신 바이트/초 | NetworkSendBytes | asynchronous_metric_log | 합계 / bucketSizeSeconds |
| 동시 TCP 연결 | CurrentMetric_TCPConnection | metric_log | |
| 동시 MySQL 연결 | CurrentMetric_MySQLConnection | metric_log | |
| 동시 HTTP 연결 | CurrentMetric_HTTPConnection | metric_log |
쿼리 인사이트
system.query_log 테이블은 쿼리 최적화, 디버깅, 그리고 전체 클러스터 상태와 성능을 모니터링하는 데 핵심적인 정보원입니다.
서비스를 선택한 후 왼쪽 사이드바에서 모니터링 탐색 메뉴를 펼치면 쿼리 인사이트 하위 항목이 표시됩니다:
상위 메트릭
최근 쿼리
쿼리 드릴다운
Settings 및 Profile Events 항목을 펼쳐 추가 정보를 확인할 수 있습니다.
- 알림 — 스케일링 이벤트, 오류, 청구에 대한 알림을 구성합니다
- Advanced dashboard — 각 대시보드 시각화에 대한 상세 참고 문서
- 시스템 테이블 쿼리 — 심층적인 내부 검사를 위해 시스템 테이블에 사용자 지정 SQL 쿼리를 실행합니다
- Prometheus 엔드포인트 — 메트릭을 Grafana, Datadog 또는 기타 Prometheus 호환 도구로 내보냅니다