Re: Limit RAM used by a perl script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> But what if the program's memory use is dependent on lots of factors
> which are not easily predictable.
> And you want to avoid bringing the whole system to it's knees while swapping
> and killing arbritrary other programs while one program is consuming all
> of ram and swap.
> In that case it's easier to limit the memory of that program to e.g. 1 GByte RAM,
> in which normal input usually can be processed without any trouble.  And then,
> when someone feeds the program some bad data which uses exponentially more memory,
> then it gracefully stops, giving a clear error message that this input results in
> too much memory use.
>
> Lots of scenario's for a valid use of such a limit exist.

I'm using the perl-BSD-Resource module, with the script confined to
512MB of RAM. So far it's working fine.  I'm not terribly worried
about the script failing, it's much more important that the server
stay up and running since it is also a production mail server.  If the
script crashes, we can deal with that separately.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux