mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-13 00:03:00 +00:00
fix: cgroupv1 mem limit + granular memory reporting (#4119)
* fix: cgroupv1 mem limit + granular memory reporting * update ee ref --------- Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
committed by
GitHub
co-authored by
Ruben Fiszel
parent
ccf281c87a
commit
9e5c5873c8
@@ -1 +1 @@
|
||||
7641d36277ffa75d816ed79d9b23eeae4f17f3a5
|
||||
8e61cafa4ee95c60eb55e5ebeb07d7b1c2947eae
|
||||
@@ -186,9 +186,9 @@ pub fn get_vcpus() -> Option<i64> {
|
||||
}
|
||||
|
||||
pub fn get_memory() -> Option<i64> {
|
||||
if Path::new("/sys/fs/cgroup/memory/memory.max").exists() {
|
||||
if Path::new("/sys/fs/cgroup/memory/memory.limit_in_bytes").exists() {
|
||||
// cgroup v1
|
||||
parse_file("/sys/fs/cgroup/memory/memory.max")
|
||||
parse_file("/sys/fs/cgroup/memory/memory.limit_in_bytes")
|
||||
} else {
|
||||
// cgroup v2
|
||||
let cgroup_path = get_cgroupv2_path()?;
|
||||
|
||||
Reference in New Issue
Block a user