疲劳是最舒适的枕头,努力工作吧。

求教熔断器parent的值是怎么算的

Elasticsearch | 作者 wanghx627 | 发布于2020年09月16日 | 阅读数:3338

根据接口_nodes/stats/breaker?pretty,得到
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "es",
"nodes" : {
"Ru5FtxEfSHma23mXhzy3ig" : {
"timestamp" : 1600248223372,
"roles" : [
"master",
"ingest",
"data",
"ml"
],
"attributes" : {
"ml.machine_memory" : "33565143040",
"ml.max_open_jobs" : "20",
"xpack.installed" : "true",
"box_type" : "hot",
},
"breakers" : {
"request" : {
"limit_size_in_bytes" : 6871947673,
"limit_size" : "6.3gb",
"estimated_size_in_bytes" : 0,
"estimated_size" : "0b",
"overhead" : 1.0,
"tripped" : 0
},
"fielddata" : {
"limit_size_in_bytes" : 3435973836,
"limit_size" : "3.1gb",
"estimated_size_in_bytes" : 413791928,
"estimated_size" : "394.6mb",
"overhead" : 1.03,
"tripped" : 0
},
"in_flight_requests" : {
"limit_size_in_bytes" : 17179869184,
"limit_size" : "16gb",
"estimated_size_in_bytes" : 374,
"estimated_size" : "374b",
"overhead" : 2.0,
"tripped" : 0
},
"accounting" : {
"limit_size_in_bytes" : 17179869184,
"limit_size" : "16gb",
"estimated_size_in_bytes" : 3523929685,
"estimated_size" : "3.2gb",
"overhead" : 1.0,
"tripped" : 0
},
"parent" : {
"limit_size_in_bytes" : 15461882265,
"limit_size" : "14.3gb",
"estimated_size_in_bytes" : 13101554952,
"estimated_size" : "12.2gb",
"overhead" : 1.0,
"tripped" : 3233
}
}
}
}
}

parent的estimated_size为啥不等于accounting+in_flight_requests+fielddata+request的estimated_size之和






 
已邀请:

wanghx627

赞同来自: Charele

如果indices.breaker.total.use_real_memory为true的话,就是堆内存;

    private MemoryUsage memoryUsed(long newBytesReserved) {
long transientUsage = 0;
long permanentUsage = 0;

for (CircuitBreaker breaker : this.breakers.values()) {
long breakerUsed = (long)(breaker.getUsed() * breaker.getOverhead());
if (breaker.getDurability() == CircuitBreaker.Durability.TRANSIENT) {
transientUsage += breakerUsed;
} else if (breaker.getDurability() == CircuitBreaker.Durability.PERMANENT) {
permanentUsage += breakerUsed;
}
}
if (this.trackRealMemoryUsage) {
final long current = currentMemoryUsage();
return new MemoryUsage(current, current + newBytesReserved, transientUsage, permanentUsage);
} else {
long parentEstimated = transientUsage + permanentUsage;
return new MemoryUsage(parentEstimated, parentEstimated, transientUsage, permanentUsage);
}
}

要回复问题请先登录注册