昨天已經介紹過,透過 grafana 監控 matching 的品質 ,今天來介紹一下,透過 grafana 監控服務在資源上的消耗,包含了 gRPC 連線狀況、Redis 的存取狀況,以及由 golang 撰寫的 Open-Match,核心程序所消耗的資源。
由於是由連線產生的 mertics 所揭露的資訊,可以用來觀察 Open-Match 核心接口被調用的狀況,以及單一接口所需花費的平均時間等資訊。
依照先前模板部署的話,dashboard 裡面有依照服務接口切分好的類別
Client RTT 可以用來觀察平均執行時間
|Metric Name | Description |
|: -------- |: -------- |
|Client Request Rate |Average gRPC client side request per second by Open Match API methods
|Server Request Rate |Average gRPC server side request per second by Open Match API methods
|gRPC Error Rate |Ratio of gRPC calls that returned an non-OK status code by Open Match methods
|Network IO per second |Total network I/O rate per second
|Bytes Sent per Call: openmatch.{Component}/{MethodName} |Average bytes sent per call by quantile
|Bytes Received per Call: openmatch.{Component}/{MethodName} |Average bytes received per call by quantile
|Client RTT: openmatch.{Component}/{MethodName} |Average roundtrip latency by quantile
Redis 監控面板裡面包含了,常見的記憶體使用量、key 的數量、存取頻率、連線數等等
|Metric Name | Description |
|: -------- |: -------- |
|Uptime |Redis uptime
|Memory Usage |Redis memory usage in percentage
|Total DB Items |Total Redis DB keys in Redis master
|CPU Usage Percentage of Limit |Current CPU usage to CPU resource limit ratio per pod (%)
| Total Memory Usage|Current and maximum Redis memory usage by Redis instances
|Hits / Misses per Sec|Cache hits/misses per second by Redis instances
|Commands Executed / sec|Executed Redis commands per second by Redis instances (excludes Redis sync calls)
|Network I/O|Total network I/O per second by Redis instances
由於 Open-Match 核心是由 golang 所編程,我們自然的會想要知道核心的記憶體使用量、GC的狀況、golang 獨有的併發方式 goroutines 數、以及 cpu 的使用率等等
Metric Name | Description |
---|---|
CPU Usage Limit Percentage | Current CPU usage to CPU resource limit ratio per pod (%) |
Go Routines | Average number of Go routines by deployment |
Process Memory | Average number of resident/virtual memory by deployment |
Process Memory Derivative | Derivative of the average number of resident/virtual memory by deployment |
Go Memstats | Average number of bytes allocated/allocation rate/stack inuse/heap inuse by deployment |
Go Memstats Derivative | Derivative of the average number of bytes allocated/allocation rate/stack inuse/heap inuse by deployment |
Open File Descriptors | Average number of currently opened file descriptors by deployment |
Open File Descriptors Derivative | Derivative of the average number of currently opened file descriptors by deployment |
GC Duration Quantiles | Average number of garbage collection time by deployment and quantile |