Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'restart': 0.09; 'restarted': 0.09; 'subject:skip:f 10': 0.09; 'subject:still': 0.09; 'used.': 0.09; 'python': 0.11; 'windows': 0.15; 'consequence,': 0.16; 'heap': 0.16; 'limiting': 0.16; 'programmatic': 0.16; 'reasonably': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'extensions': 0.16; 'java,': 0.16; 'wrote:': 0.18; 'implementing': 0.19; 'memory': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'server.': 0.24; 'header:X-Complaints-To:1': 0.27; 'van': 0.27; 'am,': 0.29; "doesn't": 0.30; 'usually': 0.31; 'workaround': 0.31; 'writes:': 0.31; 'there.': 0.32; 'running': 0.33; "i'd": 0.34; 'objects': 0.35; 'but': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'to:addr:python- list': 0.38; 'does': 0.39; 'skip:b 40': 0.39; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'tell': 0.60; 'simple': 0.61; 'received:217': 0.63; 'such': 0.63; 'places': 0.64; 'therefore,': 0.64; 'more': 0.64; 'subject': 0.69; 'price.': 0.74; 'choose.': 0.84; 'subject:High': 0.84; 'prone': 0.91; 'technique': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: dieter Subject: Re: "High water" Memory fragmentation still a thing? Date: Fri, 10 Oct 2014 08:09:33 +0200 References: <7ac186c3-2dbc-4cfa-ab58-37854aeb59d1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gmane-NNTP-Posting-Host: pd9e085b8.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) Cancel-Lock: sha1:micXhoc8/5qTyM6pAMGZIGtf7nk= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412921388 news.xs4all.nl 2873 [2001:888:2000:d::a6]:35128 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78924 Emile van Sebille writes: > On 10/8/2014 10:28 AM, > bryanjugglercryptographer@yahoo.com.dmarc.invalid wrote: > >> That doesn't mean to tell a human administrator to regularly restart the server. It's programmatic and it's a reasonably simple and well-established design pattern. > > I'd call it more a compensation technique than a design pattern*. You > know, like rebooting windows routinely. :) > > Emile > > > *) Alternately known as a workaround or kludge. Well, everything has a price. Python does not use memory compaction but places many objects on the heap and therefore, long running processes usually are subject to memory fragmentation. As a consequence, those processes need to be restarted from time to time. Would Python use memory compaction, implementing C extensions would be much more tedious and error prone and there would be less such extensions - limiting the domain where Python is used. One has to choose. People who do not like the choice of the "CPython" implementation (no memory compaction) may look at "Jython" (based on Java, with memory compaction). If they are lucky, all the extensions they need are available there.