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


Groups > comp.lang.python > #2796

Re: Sandboxed Python: memory limits?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From David Bolen <db3l.net@gmail.com>
Newsgroups comp.lang.python
Subject Re: Sandboxed Python: memory limits?
Date Thu, 07 Apr 2011 14:36:36 -0400
Lines 20
Sender db3l@valheru.db3l.homeip.net
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>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace individual.net bo86ZxfSmlq6biJkl/iOSARQ+AURQcsf26ml/MvNsr8TM6oY9x
Cancel-Lock sha1:c6RXSnj1zjM0H88Yl6I+sgNFld0= sha1:xsBq/8ptw9HLs7qBYfaWAolUyLk=
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin)
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2796

Show key headers only | 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