Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

rlimits support #13

Open
akhramov opened this issue May 23, 2021 · 0 comments
Open

rlimits support #13

akhramov opened this issue May 23, 2021 · 0 comments

Comments

@akhramov
Copy link
Owner

Quoting runtime-spec

For systems that support POSIX rlimits (for example Linux and Solaris), the process object supports the following process-specific properties...

FreeBSD definitely supports rlimits, see getrlimit(2). According to rctl(8), it's possible to set rlimits on a jail base, e.g. following will limit the amount of memory jail knast can allocate to 1g.

rctl -a jail:knast:vmemoryuse:deny=1g

The scope of this task

  • write bindings to programmatically mimic the behavior of rctl(8)
  • support runtime config's process.limits option
  • figure out the sane defaults. E.g. podman generates runtime spec like this
    {
      "type": "RLIMIT_NOFILE",
      "hard": 524288,
      "soft": 524288
    },
    {
      "type": "RLIMIT_NPROC",
      "hard": 32768,
      "soft": 32768
    }
  • Contribute these defaults to containerd
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant