Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed2.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.093 X-Spam-Evidence: '*H*': 0.81; '*S*': 0.00; 'problem:': 0.07; 'properly.': 0.09; 'subject:skip:f 10': 0.09; 'subject:still': 0.09; 'url:github': 0.09; 'url:blog': 0.10; 'python': 0.11; 'windows': 0.15; 'behavior,': 0.16; 'garbage': 0.16; 'extensions': 0.16; 'seems': 0.21; 'memory': 0.22; 'exhibit': 0.24; 'versions': 0.24; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'commonly': 0.31; 'question:': 0.31; 'linux': 0.33; 'running': 0.33; 'problem': 0.35; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'method': 0.36; 'subject:?': 0.36; 'reports': 0.37; 'operating': 0.37; 'level': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'recent': 0.39; 'does': 0.39; 'quote': 0.39; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'skip:u 10': 0.60; 'dave': 0.60; 'subject:"': 0.60; 'management.': 0.61; 'note:': 0.66; 'news': 0.67; 'jobs': 0.68; 'background:': 0.68; 'paper': 0.75; 'behavior': 0.77; 'leak': 0.84; 'subject:High': 0.84; 'url:03': 0.84; 'url:2013': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=sA0MuuyigZb8ySqo1nbhE1y8SE5uwBz+dNNUKSa55jI=; b=PjYX4OEHlyqDoFXZKASSpA2+FsAQ4WMGRMnKoRM+wZizqkzWoSgWsIXYJOZOppDipC a69qgPRxCs6LO3XjTvruoScLNEDhvtSIIxpC19o+ZtguqOSnAP7If1OoYL+i1Aj8roNc i53C2NakvqAg4dF2Ve0Qq81p7cBqR9oN3Jv2mPU2NJaRyHq+G/4Q40pksJZlLn7nn6pV EAiVdDDn0lCx1YwPH2J7bvxKzDc4k+iLvV8vb6sLolHZ9R9sL2VopcdQyPwvZFUQ/uEg zaElEizHLxEuGLfKcUq+v47/u3tD+xlB19B58WgCM+41o9cQOZXId7xQB7PVmjtcY90J ++fw== MIME-Version: 1.0 X-Received: by 10.50.111.80 with SMTP id ig16mr258654igb.43.1412361380502; Fri, 03 Oct 2014 11:36:20 -0700 (PDT) Date: Fri, 3 Oct 2014 13:36:20 -0500 Subject: "High water" Memory fragmentation still a thing? From: Croepha To: python-list@python.org Content-Type: multipart/alternative; boundary=089e014944a461228a050489023a 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: 71 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412361383 news.xs4all.nl 2879 [2001:888:2000:d::a6]:51564 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78660 --089e014944a461228a050489023a Content-Type: text/plain; charset=UTF-8 Question: Does python in general terms (apart from extensions or gc manipulation), exhibit a "high water" type leak of allocated memory in recent python versions (2.7+)? Background: >From the post: http://chase-seibert.github.io/blog/2013/08/03/diagnosing-memory-leaks-python.html Begin quote: Long running Python jobs that consume a lot of memory while running may not return that memory to the operating system until the process actually terminates, even if everything is garbage collected properly. That was news to me, but it's true. What this means is that processes that do need to use a lot of memory will exhibit a "high water" behavior, where they remain forever at the level of memory usage that they required at their peak. Note: this behavior may be Linux specific; there are anecdotal reports that Python on Windows does not have this problem. This problem arises from the fact that the Python VM does its own internal memory management. It's commonly know as memory fragmentation. Unfortunately, there doesn't seem to be any fool-proof method of avoiding it. End Quote However this paper seems to indicate that that is not a modern problem: http://www.evanjones.ca/memoryallocator/ --Thanks Dave Butler --089e014944a461228a050489023a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Question:

Does python in gen= eral terms (apart from extensions or gc manipulation), exhibit a "high= water" type leak of allocated memory in recent python versions (2.7+)= ?

Background:


F= rom the post: http://chase-seibert.github.io/blog/2013/= 08/03/diagnosing-memory-leaks-python.html

Begin = quote:

Long running Python jobs that consume = a lot of memory while running may not return that memory to the operating s= ystem until the process actually terminates, even if everything is garbage = collected properly. That was news to me, but it's true. What this means= is that processes that do need to use a lot of memory will exhibit a "= ;high water" behavior, where they remain forever at the level of memor= y usage that they required at their peak.

Note: th= is behavior may be Linux specific; there are anecdotal reports that Python = on Windows does not have this problem.

This proble= m arises from the fact that the Python VM does its own internal memory mana= gement. It's commonly know as memory fragmentation. Unfortunately, ther= e doesn't seem to be any fool-proof method of avoiding it.
<= div>
End Quote

However this paper se= ems to indicate that that is not a modern problem:=C2=A0http://www.evanjones.ca/memoryallocator/<= /a>


--089e014944a461228a050489023a--