Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30065
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.011 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; '(at': 0.03; 'lines,': 0.05; 'memory.': 0.05; 'reason,': 0.07; 'python': 0.09; 'pointers': 0.09; 'runtime': 0.09; 'cc:addr:python-list': 0.10; 'file,': 0.15; 'value.': 0.15; 'blocks': 0.16; 'build.': 0.16; 'heap,': 0.16; 'limit,': 0.16; 'md5': 0.16; 'next.': 0.16; 'storing': 0.16; 'subject:usage': 0.16; 'surprising': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'memory': 0.18; 'windows': 0.19; 'file.': 0.20; 'written': 0.20; 'bit': 0.21; 'sorry,': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'idea': 0.24; 'linux': 0.24; 'machine': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'realize': 0.27; 'wonder': 0.27; 'object,': 0.27; 'structures': 0.27; "doesn't": 0.28; 'there.': 0.28; 'measure': 0.29; 'subject:per': 0.29; 'surprised': 0.29; "i'm": 0.29; 'normally': 0.30; 'code': 0.31; 'point': 0.31; 'gets': 0.32; 'file': 0.32; "aren't": 0.33; 'values.': 0.33; 'another': 0.33; 'that,': 0.34; 'loss': 0.34; 'problem,': 0.35; 'something': 0.35; 'ability': 0.36; 'but': 0.36; 'loaded': 0.36; 'anything': 0.36; 'should': 0.36; 'beyond': 0.37; 'reported': 0.37; 'two': 0.37; 'virtual': 0.37; 'quite': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'store': 0.38; 'mean': 0.38; 'object': 0.38; 'some': 0.38; 'sure': 0.38; 'several': 0.39; 'system.': 0.39; 'received:192': 0.39; 'space': 0.39; 'received:192.168': 0.40; 'help': 0.40; 'think': 0.40; 'your': 0.60; 'most': 0.61; 'save': 0.61; 'map': 0.61; 'free': 0.61; 'back': 0.62; 'times': 0.63; 'more': 0.63; 'account': 0.67; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'million': 0.72; 'reply-to:no real name:2**0': 0.72; 'confusing': 0.84; 'destruction,': 0.84; 'hanging': 0.84; "it'd": 0.84; 'manages': 0.84; 'overhead,': 0.84; "shouldn't,": 0.84; 'preventing': 0.91 |
| Date | Tue, 25 Sep 2012 07:06:29 -0400 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
| MIME-Version | 1.0 |
| To | Junkshops <junkshops@gmail.com> |
| Subject | Re: Memory usage per top 10x usage per heapy |
| References | <983c532f-3ff6-4bd2-bb48-07cf4d065a4b@googlegroups.com> <5061056F.6080702@davea.name> <50613131.6030102@gmail.com> |
| In-Reply-To | <50613131.6030102@gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:/j6gKYnEEs5SVQJNZWudXXVsBBcS6rdzanEh0TLJAr2 iT7UQMh0hWsvmYjK7XfUJ2e4JylGuezrhn+X72M8oPkDLEhJAy Q4qNm10VXcE6FeZFdPu/Y5vI+CIc8V/IAFwhXOzcoMbKJz/jBD k5dPOrhIcQMr+fhXbUPbtOaxvHaXuIcEywbPlcuqtfqZz4mYSZ yW2lPOdFHVz6qm9Xmmu06PL00/V381Xbi24a7uPTC4yAg/Io63 PeWeUYbG7JgDHnMrKVFa/bxJnExatsVvWUiSzJpB/zUXZ+OfL9 TjLaDGa3ZbrOcLMZF4bYDk7yKgcPLje4O11FFc2kuX2wlG/oA= = |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1318.1348571218.27098.python-list@python.org> (permalink) |
| Lines | 43 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1348571218 news.xs4all.nl 6877 [2001:888:2000:d::a6]:56331 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:30065 |
Show key headers only | View raw
On 09/25/2012 12:21 AM, Junkshops wrote: >> Just curious; which is it, two million lines, or half a million bytes? <snip> > > Sorry, that should've been a 500Mb, 2M line file. > >> which machine is 2gb, the Windows machine, or the VM? > VM. Winders is 4gb. > >> ...but I would point out that just because >> you free up the memory from the Python doesn't mean it gets released >> back to the system. The C runtime manages its own heap, and is pretty >> persistent about hanging onto memory once obtained. It's not normally a >> problem, since most small blocks are reused. But it can get >> fragmented. And i have no idea how well Virtual Box maps the Linux >> memory map into the Windows one. > Right, I understand that - but what's confusing me is that, given the > memory use is (I assume) monotonically increasing, the code should never > use more than what's reported by heapy once all the data is loaded into > memory, given that memory released by the code to the Python runtime is > reused. To the best of my ability to tell I'm not storing anything I > shouldn't, so the only thing I can think of is that all the object > creation and destruction, for some reason, it preventing reuse of > memory. I'm at a bit of a loss regarding what to try next. I'm not familiar with heapy, but perhaps it's missing something there. I'm a bit surprised you aren't beyond the 2gb limit, just with the structures you describe for the file. You do realize that each object has quite a few bytes of overhead, so it's not surprising to use several times the size of a file, to store the file in an organized way. I also wonder if heapy has been written to take into account the larger size of pointers in a 64bit build. Perhaps one way to save space would be to use a long to store those md5 values. You'd have to measure it, but I suspect it'd help (at the cost of lots of extra hexlify-type calls). Another thing is to make sure that the md5 object used in your two maps is the same object, and not just one with the same value. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Memory usage per top 10x usage per heapy MrsEntity <junkshops@gmail.com> - 2012-09-24 14:59 -0700
Re: Memory usage per top 10x usage per heapy Tim Chase <python.list@tim.thechases.com> - 2012-09-24 18:22 -0500
Re: Memory usage per top 10x usage per heapy Junkshops <junkshops@gmail.com> - 2012-09-24 16:58 -0700
Re: Memory usage per top 10x usage per heapy bryanjugglercryptographer@yahoo.com - 2012-09-27 01:00 -0700
Re: Memory usage per top 10x usage per heapy bryanjugglercryptographer@yahoo.com - 2012-09-27 01:00 -0700
Re: Memory usage per top 10x usage per heapy Dave Angel <d@davea.name> - 2012-09-24 21:14 -0400
Re: Memory usage per top 10x usage per heapy Junkshops <junkshops@gmail.com> - 2012-09-24 21:21 -0700
Re: Memory usage per top 10x usage per heapy Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 00:41 -0400
Re: Memory usage per top 10x usage per heapy Tim Chase <python.list@tim.thechases.com> - 2012-09-25 05:51 -0500
Re: Memory usage per top 10x usage per heapy Dave Angel <d@davea.name> - 2012-09-25 07:06 -0400
Re: Memory usage per top 10x usage per heapy Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 12:10 +0100
Re: gracious responses (was: Memory usage per top 10x usage per heapy) Tim Chase <python.list@tim.thechases.com> - 2012-09-25 06:40 -0500
Re: gracious responses (was: Memory usage per top 10x usage per heapy) alex23 <wuwei23@gmail.com> - 2012-09-25 05:44 -0700
Re: gracious responses Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 13:53 +0100
Re: gracious responses Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 12:54 +0100
Re: gracious responses Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 15:17 +0000
Re: Memory usage per top 10x usage per heapy Dave Angel <d@davea.name> - 2012-09-25 14:50 -0400
Re: Memory usage per top 10x usage per heapy Junkshops <junkshops@gmail.com> - 2012-09-25 14:02 -0700
Re: Memory usage per top 10x usage per heapy Junkshops <junkshops@gmail.com> - 2012-09-25 14:35 -0700
Re: Memory usage per top 10x usage per heapy Tim Chase <python.list@tim.thechases.com> - 2012-09-25 17:10 -0500
Re: Memory usage per top 10x usage per heapy Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-25 16:09 -0600
Re: Memory usage per top 10x usage per heapy Tim Chase <python.list@tim.thechases.com> - 2012-09-25 18:35 -0500
csiph-web