[GH-ISSUE #49] Question: can firejail restrict the amount of RAM a program is using? #27

Closed
opened 2026-05-05 04:46:21 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @pitchforks on GitHub (Aug 31, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/49

subj

Originally created by @pitchforks on GitHub (Aug 31, 2015). Original GitHub issue: https://github.com/netblue30/firejail/issues/49 subj
gitea-mirror 2026-05-05 04:46:21 -06:00
Author
Owner

@netblue30 commented on GitHub (Aug 31, 2015):

You would need to set up a Linux control group (https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt) and set a memory limit. Then, you pass the tasks file to firejail. Example, assuming your cgroup is in /sys/fs/cgroup/g1 you will run:

$ firejail --cgroup=/sys/fs/cgroup/g1/tasks
<!-- gh-comment-id:136357520 --> @netblue30 commented on GitHub (Aug 31, 2015): You would need to set up a Linux control group (https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt) and set a memory limit. Then, you pass the tasks file to firejail. Example, assuming your cgroup is in /sys/fs/cgroup/g1 you will run: ``` $ firejail --cgroup=/sys/fs/cgroup/g1/tasks ```
Author
Owner

@pitchforks commented on GitHub (Sep 1, 2015):

Thanks.

Adding for reference: Linux control groups support, --cgroup option was added in version 0.9.20.

<!-- gh-comment-id:136595687 --> @pitchforks commented on GitHub (Sep 1, 2015): Thanks. Adding for reference: Linux control groups support, --cgroup option was added in version 0.9.20.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#27
No description provided.