mirror of https://github.com/milvus-io/milvus.git
Add rate limit ratio monitoring (#26709)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/26725/head
parent
a34a9d606c
commit
c6024a32f5
|
@ -456,6 +456,7 @@ func (q *QuotaCenter) calculateWriteRates() error {
|
||||||
updateCollectionFactor(growingSegFactors)
|
updateCollectionFactor(growingSegFactors)
|
||||||
|
|
||||||
for collection, factor := range collectionFactors {
|
for collection, factor := range collectionFactors {
|
||||||
|
metrics.RootCoordRateLimitRatio.WithLabelValues(fmt.Sprint(collection)).Set(1 - factor)
|
||||||
if factor <= 0 {
|
if factor <= 0 {
|
||||||
if _, ok := ttFactors[collection]; ok && factor == ttFactors[collection] {
|
if _, ok := ttFactors[collection]; ok && factor == ttFactors[collection] {
|
||||||
// factor comes from ttFactor
|
// factor comes from ttFactor
|
||||||
|
|
|
@ -169,6 +169,15 @@ var (
|
||||||
"quota_states",
|
"quota_states",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// RootCoordRateLimitRatio reflects the ratio of rate limit.
|
||||||
|
RootCoordRateLimitRatio = prometheus.NewGaugeVec(
|
||||||
|
prometheus.GaugeOpts{
|
||||||
|
Namespace: milvusNamespace,
|
||||||
|
Subsystem: typeutil.RootCoordRole,
|
||||||
|
Name: "rate_limit_ratio",
|
||||||
|
Help: "",
|
||||||
|
}, []string{collectionIDLabelName})
|
||||||
|
|
||||||
RootCoordDDLReqLatencyInQueue = prometheus.NewHistogramVec(
|
RootCoordDDLReqLatencyInQueue = prometheus.NewHistogramVec(
|
||||||
prometheus.HistogramOpts{
|
prometheus.HistogramOpts{
|
||||||
Namespace: milvusNamespace,
|
Namespace: milvusNamespace,
|
||||||
|
@ -208,5 +217,6 @@ func RegisterRootCoord(registry *prometheus.Registry) {
|
||||||
registry.MustRegister(RootCoordNumOfRoles)
|
registry.MustRegister(RootCoordNumOfRoles)
|
||||||
registry.MustRegister(RootCoordTtDelay)
|
registry.MustRegister(RootCoordTtDelay)
|
||||||
registry.MustRegister(RootCoordQuotaStates)
|
registry.MustRegister(RootCoordQuotaStates)
|
||||||
|
registry.MustRegister(RootCoordRateLimitRatio)
|
||||||
registry.MustRegister(RootCoordDDLReqLatencyInQueue)
|
registry.MustRegister(RootCoordDDLReqLatencyInQueue)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue