Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2796

Re: Sandboxed Python: memory limits?

From David Bolen <db3l.net@gmail.com>
Newsgroups comp.lang.python
Subject Re: Sandboxed Python: memory limits?
Date 2011-04-07 14:36 -0400
Message-ID <m2mxk129jf.fsf@valheru.db3l.homeip.net> (permalink)
References <mailman.62.1302055157.9059.python-list@python.org> <inij0j$v6v$1@online.de> <BANLkTimr8KhzbT4SGVY_9wbp24h46LGPMQ@mail.gmail.com> <mailman.92.1302135041.9059.python-list@python.org>

Show all headers | View raw


Chris Angelico <rosuav@gmail.com> writes:

>                    So I'm hoping to restrict the script's ability to
> consume all of memory, without (preferably) ulimit/rlimiting the
> entire process (which does other things as well). But if it can't be,
> it can't be.

Just wondering, but rather than spending the energy to cap Python's
allocations internally, could similar effort instead be directed at
separating the "other things" the same process is doing?  How tightly
coupled is it?  If you could split off just the piece you need to
limit into its own process, then you get all the OS tools at your
disposal to restrict the resources of that process.

Depending on what the "other" things are, it might not be too hard to
split apart, even if you have to utilize some IPC mechanism to
coordinate among the two pieces.  Certainly might be of the same order
of magnitude of tweaking Python to limit memory internally.

-- David

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-06 11:59 +1000
  Re: Sandboxed Python: memory limits? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-06 22:38 +0200
    Re: Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-07 10:06 +1000
      Re: Sandboxed Python: memory limits? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-07 10:01 +0200
      Re: Sandboxed Python: memory limits? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-07 10:01 +0200
    Re: Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-07 10:10 +1000
      Re: Sandboxed Python: memory limits? David Bolen <db3l.net@gmail.com> - 2011-04-07 14:36 -0400
        Re: Sandboxed Python: memory limits? Chris Angelico <rosuav@gmail.com> - 2011-04-08 04:59 +1000

csiph-web