Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!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.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'cpython': 0.05; 'pypy': 0.07; 'code"': 0.09; 'expectation': 0.09; 'machines.': 0.09; 'subject:skip:f 10': 0.09; 'subject:still': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'benefit.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'gained': 0.16; 'garbage': 0.16; 'throw': 0.16; 'unlikely': 0.16; 'sat,': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'work,': 0.20; 'machine': 0.22; 'memory': 0.22; 'cc:addr:python.org': 0.22; 'fairly': 0.24; 'cc:2**0': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'feature': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; "d'aprano": 0.31; 'purely': 0.31; 'steven': 0.31; 'running': 0.33; 'requirement': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'vice': 0.36; 'done': 0.36; 'doing': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'two': 0.37; 'performance': 0.37; 'pm,': 0.38; 'little': 0.38; 'subject:" ': 0.39; 'how': 0.40; 'remove': 0.60; 'removing': 0.60; 'most': 0.60; 'issues,': 0.61; 'matter': 0.61; 'simply': 0.61; "you're": 0.61; 'show': 0.63; 'real': 0.63; 'different': 0.65; 'capable': 0.67; 'benefit': 0.68; 'improvement.': 0.68; 'improvements': 0.68; 'removal': 0.74; 'complexity': 0.84; 'improvement': 0.84; 'python-dev': 0.84; 'subject:High': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=3wa5Y8eh9mAgLVM4YZEcbF8zBwG3OfPqycHyaFM1hmk=; b=CUdDh/ZkyVFNSVhlz+d6/Nqx4n/PRSPtDx3juKclPsGFPdjt/pGSjmoXlihXbMOLqz kWILaldN4J4RQ4xHDvuKDksf3YQjbNfNZsrJk2EniM0M09sjqNXczEEHqA1iOYedZgDM OQx+Mkt5S7+6bHTQ75qbDTH3Gc24TxEbjQDyO+fM1ZZ4jSRUEzcSUrFvhjQtJ6qVVR6G DqovLQTZo8okhyxTDIrNCdUjt1lkiGpxSwrgkfvaTWHtFZMm6giJgYvdPzBhXw7Y6eme 2bJVUAOLH8KngGWXIMR6ARPLpc4IgxymgBGq+9p8RSIRMA5gcFLMTgzuboXocz+9LPE/ WZVw== MIME-Version: 1.0 X-Received: by 10.42.90.80 with SMTP id j16mr17513369icm.27.1412402222889; Fri, 03 Oct 2014 22:57:02 -0700 (PDT) In-Reply-To: <542f8a27$0$12998$c3e8da3$5496439d@news.astraweb.com> References: <542f470b$0$13003$c3e8da3$5496439d@news.astraweb.com> <542f8a27$0$12998$c3e8da3$5496439d@news.astraweb.com> Date: Sat, 4 Oct 2014 15:57:02 +1000 Subject: Re: "High water" Memory fragmentation still a thing? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412402225 news.xs4all.nl 2891 [2001:888:2000:d::a6]:46893 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 2417886249 X-Received-Bytes: 5732 Xref: csiph.com comp.lang.python:78681 On Sat, Oct 4, 2014 at 3:48 PM, Steven D'Aprano wrote: > I think that you're conflating a couple of different issues, although I > welcome correction. > > I don't think that removing the GIL is a requirement for a memory compactor, > or vice versa. I think that PyPy is capable of plugging in various > different garbage collectors, including some without the GIL, which may or > may not include memory compactors. So as far as I can tell, the two are > independent. > > As far as the GIL in CPython goes, there have been at least two attempts to > remove it, and they do show strong improvements for multi-threaded code > running on multi-core machines. Alas, they also show significant *slowdown* > for single-core machines, and very little improvement on dual-core > machines. Not conflating, comparing. In both cases, it's perfectly possible *in theory* to build a CPython with this change. (GIL removal is clearly possible in theory, as it's been done in practice.) And *in theory*, there's some benefit to be gained by doing so. But it's not a case of "why doesn't python-dev just knuckle down and do it already", as there's no evidence that it's a real improvement. (A "compile to machine code" feature might well be purely beneficial, and that's simply a matter of work - how much work, for how many CPU architectures, to get how much benefit. But at least that's going to have a fairly good expectation of performance improvement.) A memory compactor might well help a narrow set of Python programs (namely, those which allocate heaps and heaps of memory, then throw away most of it, and keep running for a long time), but the complexity cost will make it unlikely to be of benefit. ChrisA