Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ac000/lemem

Simple utility to run a program while limiting the amount of memory it can use.
https://github.com/ac000/lemem

Last synced: 7 days ago
JSON representation

Simple utility to run a program while limiting the amount of memory it can use.

Awesome Lists containing this project

README

        

A simple utility to run a program while limiting the amount of memory it can
use using Linux's cgroups memory controller (CONFIG_MEMCG).

Usage is as simple as

$ lemem [-l] [-s] -m -- [args ...]

-m is for specifying the memory Limit in MiB. A softer limit is set at 95%
of the specified limit.

-s can optionally be passed to disable the use of swap for the process.

You can also optionally try to make lemem a process group leader via the -l
option.

It should be installed setuid root (4755) with owner:group root. It will drop
back to the users Real GID/UID before executing the specified program.

It is licensed under the GNU General Public License Version 2, see the COPYING
file.

NOTE: This is for cgroups V2. If you want a version that works with V1,
checkout the 'cgroup_v1' tag.