[PLUG] Limiting memory to a program

Larry Brigman larry.brigman at gmail.com
Thu Jul 7 21:42:01 UTC 2016


We had an issue similar to this.
We called it the vi of death.
Since the boxes we were on didn't have swap, opening a very large file
could consume all of available memory, invoking oom killer.
We put these in a cgroup with a memory limit using cgexec.
The group needs to be created in advance but it won't partition that memory
usage until a process is placed in the group.
On Jul 7, 2016 12:16 PM, "Tim Wescott" <tim at wescottdesign.com> wrote:

> I have a program (Scilab), which occasionally decides that it's hungry
> and wants to eat lots and lots of memory.  This seems to be dependent on
> what code I'm running (Scilab includes an interpreted data-analysis
> language).
>
> Something about the way that Ubuntu is set up lets it use up so much
> memory that it bogs down my computer to the point where I need to do a
> hard reboot.  I think that it's hitting swap so hard that the normal
> rationing of processor time to processes is hijacked by memory
> availability.
>
> Once I'm done rattling the appropriate bars at Scilab.org with a bug
> report, is there a way to launch a program under Linux that limits its
> memory access, either by total amount or in a way that'll throttle down
> just that program when it goes to swap?
>
> --
>
> Tim Wescott
> www.wescottdesign.com
> Control & Communications systems, circuit & software design.
> Phone: 503.631.7815
> Cell:  503.349.8432
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list