Comments (1)
@vickeykumar you're getting this error because the you haven't assigned any memory nodes to your cgroup. The example code sadly omits this, as the spec object uses strings, so the defaults are "" rather than zero. To make this work I had to do make the call to cgroups.New
like so:
control, err := cgroups.New(cgroups.V1,
cgroups.StaticPath("/test"),
&specs.LinuxResources{
CPU: &specs.LinuxCPU{
Quota: "a,
Period: &period,
Cpus: "0", //zero means use any an all CPUs for this cgroup.
Mems: "0", //means use all memory for this cgroup
},
})
from cgroups.
Related Issues (20)
- Question: What is the equivalent of writing input into `devices.allow`? HOT 1
- MemorySwapMax is never set on systemd? HOT 1
- Support OomGroupKill in cgroup2 memory events stats
- cgroup v1 rdma.current HOT 6
- NewSystemd must not ignore UnitExists HOT 3
- Reduce allocations for Stat in cg2 HOT 2
- Not compatible with linux6 HOT 4
- Stat in cpu and cpuacct in cgroupv1 may access nil pointer HOT 1
- Add a mechanism to disable the default cpuset controller in v2 HOT 1
- Calling cgroup V1 New function fails for kernels that don't have swap enabled
- Restriction does not work HOT 1
- Unable to use v3.0.1 release HOT 1
- Running cgroups stats functionality within k8s HOT 1
- Containerd fails with error: strconv.ParseUint: parsing "(unknown)": invalid syntax
- net_cls cgroup mounting HOT 1
- oom killer cannot be re-enabled HOT 2
- ToResources method has a bug in the conversion of swap memory limits. HOT 3
- The container cgroup path of pod is not loaded properly HOT 1
- Release 3.0.3 HOT 1
- We have a misspelling WithHiearchy option in cgroup1, spreading typos to downstream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgroups.