etcd query range API took > 200ms, how to optimize existing etcd cluster? #15775
Replies: 5 comments 1 reply
-
The possible bottleneck:
Please read How to debug performance issue? . Also check the etcdserver's log, check how big the range response is; note the |
Beta Was this translation helpful? Give feedback.
-
metric check
etcd endpoint health checkI used below command to check
It is ok too. Do etcd-defrag tool to perform defragmentationAfter applied, etcd startup styleuse docker to startup. key info as below
use hdd or ssd to storage data(after checked, the disk type is
|
Beta Was this translation helpful? Give feedback.
-
Please look at the trace log, please provide more logs around the two log entries you provided. The range request returned 3045 and 356 records respectively. Also please try to read a key prefix with less number of keys. |
Beta Was this translation helpful? Give feedback.
-
After added more logs in our application, like this
etcd itself has no problem(Btw, only consumes < 10ms for above logs) |
Beta Was this translation helpful? Give feedback.
-
I will close this. |
Beta Was this translation helpful? Give feedback.
-
Send query range request to etcd cluster
Our company inner server will send like below request to
etcd cluster
From above result, we can see, the response time is about
263ms
,sometime, the response time is about500ms
Obviously, the response time is very long, my target is reduce the response time to
< 100ms
Btw, our etcd cluster has about
150, 000
keys.etcd cluster's startup command
Execute like above command to all etcd nodes
How to optimize existing etcd cluster?
How to find the issue on existing etcd cluster?
As we already know, when execute mysql statement, we can find the execute path and find the issue,
But for etcd, when execute like
etcdctl get /..../.... --prefix
, there has any way to find where the issue?Other info
Endpoint health status
Beta Was this translation helpful? Give feedback.
All reactions