mirror of https://github.com/milvus-io/milvus.git
Use TotalInactiveFile in GetContainerMemUsed (#10800)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/10813/head
parent
1f2f76789e
commit
d264e150cf
|
@ -58,7 +58,7 @@ func GetContainerMemUsed() (uint64, error) {
|
|||
return 0, errors.New("cannot find memory usage info from cGroups")
|
||||
}
|
||||
// ref: <https://github.com/docker/cli/blob/e57b5f78de635e6e2b688686d10b830c4747c4dc/cli/command/container/stats_helpers.go#L239>
|
||||
inactiveFile := stats.Memory.InactiveFile
|
||||
inactiveFile := stats.Memory.TotalInactiveFile
|
||||
usage := stats.Memory.Usage.Usage
|
||||
if inactiveFile < usage {
|
||||
return usage - inactiveFile, nil
|
||||
|
|
Loading…
Reference in New Issue