0

I'm trying to limit resource usage for a cgroup without having root access.

I can set memory.limit_in_bytes using cgm setvalue memory memory.limit_in_bytes 150G

But I can not set memsw.limit_in_bytes in the same way, regardless of whether memsw.limit_in_bytes is greater than memory.limit_in_bytes (This is necessary, because the memsw option sets maximum memory + swap limit)

All I receive is: Error org.freedesktop.DBus.Error.InvalidArgs: invalid request

Any ideas?

0

When using cgm, beware that cgm chown $controller $cgroup $uid $gid only changes the owner of the /sys/fs/cgroup/$controller/$cgroup directory and its cgroup.procs and tasks files. Unprivileged users who cannot write to those files will get an call to cgmanager_set_value_sync failed: invalid request message as you found out.

Another possibility is that the file is missing, for example due to missing swap support in the kernel. If your kernel is not configured with CONFIG_MEMCG_SWAP_ENABLED, then you have to pass the swapaccount=1 cmdline option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.