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


Groups > comp.lang.python > #48414

Re: Debugging memory leaks

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; '(python,': 0.07; 'context': 0.07; 'detect': 0.07; 'suppose': 0.07; 'components,': 0.09; 'http': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'restart': 0.09; 'assume': 0.14; 'leaks': 0.16; 'losing': 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; 'unnecessary.': 0.16; 'usable': 0.16; 'trying': 0.19; 'meant': 0.20; 'starts': 0.20; 'seems': 0.21; 'memory': 0.22; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'case.': 0.24; 'right.': 0.26; 'suggested': 0.26; 'header:X-Complaints-To:1': 0.27; 'chris': 0.29; 'waste': 0.30; 'easier': 0.31; 'usually': 0.31; 'are.': 0.31; 'consisting': 0.31; 'writes:': 0.31; 'languages': 0.32; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'ram': 0.36; 'charset:us-ascii': 0.36; 'server': 0.38; 'checks': 0.38; 'to:addr:python-list': 0.38; 'reported': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'most': 0.60; 'browser': 0.61; 'times': 0.62; 'received:217': 0.63; 'developed': 0.63; 'such': 0.63; 'different': 0.65; 'request.': 0.70; 'analysis': 0.75; 'day': 0.76; 'attractive': 0.81; 'action.': 0.84; 'leak': 0.84; 'perspective.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: Debugging memory leaks
Date Sun, 16 Jun 2013 08:18:38 +0200
References <09917103-b35e-4728-8fea-bcb4ce2bd1af@googlegroups.com> <mailman.3165.1371104977.3114.python-list@python.org> <slrnkrkacg.2u4.giorgos.tzampanakis@brilliance.eternal-september.org> <51ba82b5$0$29997$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqF3b1CZ5wB3C6kC3o=uUYt-7KCQax7_U+NQ77e8xvVBw@mail.gmail.com> <87y5abyig3.fsf@handshake.de> <CAPTjJmoLO8U5qpwZ_atS_5qE+Jk+BfiVkt_HC=CRuHTaTf07pQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Gmane-NNTP-Posting-Host pd9e0bdd8.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:tekoGwbCYn7WILd6DErJh0/pOQU=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
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.3428.1371363534.3114.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371363534 news.xs4all.nl 15939 [2001:888:2000:d::a6]:40526
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48414

Show key headers only | View raw


Chris Angelico <rosuav@gmail.com> writes:
> ...
> Right. Everything needs to be scaled. Everything needs to be in
> perspective. Losing 1 kilobit per day is indeed trivial; even losing
> one kilobyte per day, which is what I assume you meant :), isn't
> significant. But it's not usually per day, it's per leaking action.
> Suppose your web browser leaks 1024 usable bytes of RAM every HTTP
> request. Do you know how much that'll waste per day? CAN you know?

What I suggested to the original poster was that *he* checks
whether *his* server leaks a really significant amount of memory
-- and starts to try a (difficult) memory leak analysis only in this
case. If he can restart his server periodically, this may make
the analysis unnecessary.

I also reported that I have undertaken such an analysis several times and
what helped me in these cases. I know - by experience - how difficult 
those analysis are. And there have been cases, where I failed despite
much effort: the systems I work with are huge, consisting of
thousands of components, developed by various independent groups,
using different languages (Python, C, Java); each of those components
may leak memory; most components are "foreign" to me.
Surely, you understand that in such a context a server restart
in the night of a week end (leading to a service disruption of a
few seconds) seems an attractive alternative to trying to locate the leaks.

Things would change drastically if the leak is big enough to force a restart
every few hours. But big leaks are *much* easier to detect
and locate than small leaks.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Debugging memory leaks writeson <doug.farrell@gmail.com> - 2013-06-12 18:24 -0700
  Re: Debugging memory leaks dieter <dieter@handshake.de> - 2013-06-13 08:29 +0200
    Re: Debugging memory leaks Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-13 20:15 +0000
      Re: Debugging memory leaks Steve Simmons <square.steve@gmail.com> - 2013-06-13 22:45 +0100
      Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-14 08:36 +1000
      Re: Debugging memory leaks Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-14 02:40 +0000
        Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-14 19:30 +1000
        Re: Debugging memory leaks Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2013-06-14 22:57 +0000
          Re: Debugging memory leaks Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-15 01:39 +0000
        Re: Debugging memory leaks dieter <dieter@handshake.de> - 2013-06-15 08:52 +0200
        Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-15 17:21 +1000
        Re: Debugging memory leaks dieter <dieter@handshake.de> - 2013-06-16 08:18 +0200
      Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-14 06:53 -0700
        Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-15 10:11 +1000
        Re: Debugging memory leaks Ben Finney <ben+python@benfinney.id.au> - 2013-06-15 10:16 +1000
          Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-14 20:16 -0700
            Re: Debugging memory leaks Ben Finney <ben+python@benfinney.id.au> - 2013-06-15 21:23 +1000
              Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-15 04:35 -0700
                Re: Debugging memory leaks Chris Angelico <rosuav@gmail.com> - 2013-06-15 21:54 +1000
  Re: Debugging memory leaks writeson <doug.farrell@gmail.com> - 2013-06-13 11:07 -0700
    Re: Debugging memory leaks Dave Angel <davea@davea.name> - 2013-06-13 14:44 -0400
  Re: Debugging memory leaks rusi <rustompmody@gmail.com> - 2013-06-14 05:36 -0700
  Re: Debugging memory leaks "Frank Millman" <frank@chagford.com> - 2013-06-21 08:50 +0200

csiph-web