Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78770
| Path | csiph.com!usenet.pasdenom.info!news.franciliens.net!fdn.fr!usenet-fr.net!nerim.net!novso.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 | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'restarting': 0.07; '*is*': 0.09; 'http': 0.09; 'http,': 0.09; 'quarter': 0.09; 'restarted': 0.09; 'subject:skip:f 10': 0.09; 'subject:still': 0.09; 'sure,': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'apache': 0.15; '"long': 0.16; 'daemon,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lengths': 0.16; 'processes.': 0.16; 'reasonably': 0.16; 'reliably': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'example': 0.22; 'admin': 0.22; 'cc:addr:python.org': 0.22; 'necessary.': 0.24; 'of.': 0.24; 'planned': 0.24; 'tend': 0.24; 'connected': 0.24; 'server.': 0.24; 'cc:2**0': 0.24; 'least': 0.26; 'skip:" 20': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; '[1]': 0.29; 'am,': 0.29; 'sets': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'requests': 0.31; 'url:wiki': 0.31; 'assumes': 0.31; 'forces': 0.31; 'terminate': 0.31; 'time;': 0.31; 'url:wikipedia': 0.31; 'allows': 0.31; 'handled': 0.32; 'running': 0.33; 'problem.': 0.35; 'good.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'building': 0.35; 'there': 0.35; 'doing': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'half': 0.37; 'virtual': 0.37; 'so,': 0.37; 'too': 0.37; 'operating': 0.37; 'server': 0.38; 'product.': 0.38; 'solving': 0.38; 'resource': 0.38; 'that,': 0.38; 'subject:" ': 0.39; 'though,': 0.39; 'either': 0.39; 'how': 0.40; 'even': 0.60; 'most': 0.60; 'management.': 0.61; 'effective': 0.61; 'strictly': 0.61; 'simple': 0.61; 'such': 0.63; 'strategy': 0.64; 'more': 0.64; 'services': 0.66; 'benefit': 0.68; 'lose': 0.68; 'results': 0.69; 'cut': 0.74; 'discrete': 0.84; 'everything.': 0.84; 'subject:High': 0.84; 'habit': 0.91; '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:content-transfer-encoding; bh=tP0BIi97rdh/rrpkSqMX91ijt+6/UhmB98qHhyL8l98=; b=E2cRquga/NEDWfyBCzPBsExI1nem4+7pE/f04N9nHuNqOzYjYGpJp9yyCO0HFQsW5H qGG0JXb6LgxKmSUMlllLrjVtzfkOnzNfHr2SpTPhTzaEpXug5/rZuyWGSKz5BIUHnebS EGO/ZLoHV7ShCLfKgkeDHndeKvJKaqMCw0jTzYEn3hziAq60fRjmK37ffTqDfvrSjaRx GHO0vVO1Jq2Q272XwyPfbWt8b3iDwzdLcaeVHAEDgZYiQR7JX/2V+roSyYyS6EPsD+qY /UvIE1D7WpRTQ9P15ZYvQvE5oko6MmWbEv9he9PR5fTPQQ/nFoKl8eI7JYLepBmjPUj/ vTCg== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.102.106 with SMTP id fn10mr23149125igb.14.1412613793871; Mon, 06 Oct 2014 09:43:13 -0700 (PDT) |
| In-Reply-To | <7ac186c3-2dbc-4cfa-ab58-37854aeb59d1@googlegroups.com> |
| References | <CANm61jc=pB7n+5kuea6bmYXTbo3hXLT8d4JZx3Yq-TBtgGrFOQ@mail.gmail.com> <mailman.14590.1412378803.18130.python-list@python.org> <7ac186c3-2dbc-4cfa-ab58-37854aeb59d1@googlegroups.com> |
| Date | Tue, 7 Oct 2014 03:43:13 +1100 |
| Subject | Re: "High water" Memory fragmentation still a thing? |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| 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 | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14647.1412613796.18130.python-list@python.org> (permalink) |
| Lines | 46 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1412613796 news.xs4all.nl 2907 [2001:888:2000:d::a6]:44176 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:78770 |
Show key headers only | View raw
On Tue, Oct 7, 2014 at 3:21 AM, <bryanjugglercryptographer@yahoo.com.dmarc.invalid> wrote: > Chris Angelico wrote: >> This is why a lot of long-duration processes are built to be restarted >> periodically. It's not strictly necessary, but it can be the most >> effective way of solving a problem. I tend to ignore that, though, and >> let my processes just keep on running... for 88 wk 4d 23:56:27 so far, >> on one of those processes. It's consuming less than half a gig of >> virtual memory, quarter gig resident, and it's been doing a fair bit [...] > > A shipping product has to meet a higher standard. Planned process mortality is a reasonably simple strategy for building robust services from tools that have flaws in resource management. It assumes only that the operating system reliably reclaims resources from dead processes. > Sure, and that's all well and good. But what I just cited there *is* a shipping product. That's a live server that runs a game that I'm admin of. So it's possible to do without the resource safety net of periodic restarts. > For an example see the Apache HTTP daemon, particularly the classic pre-forking server. There's a configuration parameter, "MaxRequestsPerChild", that sets how many requests a process should answer before terminating. > That assumes that requests can be handled equally by any server process - and more so, that there are such things as discrete requests. That's true of HTTP, but not of everything. And even with HTTP, if you do "long polls" [1] then clients might remain connected for arbitrary lengths of time; either you have to cut them off when you terminate the server process (hopefully that isn't too often, or you lose the benefit of long polling), or you retain processes for much longer. Restarting isn't necessary. It's like rebooting a computer: people get into the habit of doing it, because it "fixes problems", but all that means is that it allows you to get sloppy with resource management. Working under the constraint that your one process will remain running for at least a year forces you to be careful, and IMO results in better code overall. ChrisA [1] https://en.wikipedia.org/wiki/Push_technology#Long_polling
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: "High water" Memory fragmentation still a thing? Chris Angelico <rosuav@gmail.com> - 2014-10-04 09:26 +1000
Re: "High water" Memory fragmentation still a thing? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-04 11:02 +1000
Re: "High water" Memory fragmentation still a thing? Chris Angelico <rosuav@gmail.com> - 2014-10-04 12:22 +1000
Re: "High water" Memory fragmentation still a thing? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-04 15:48 +1000
Re: "High water" Memory fragmentation still a thing? Chris Angelico <rosuav@gmail.com> - 2014-10-04 15:57 +1000
Re: "High water" Memory fragmentation still a thing? Sturla Molden <sturla.molden@gmail.com> - 2014-10-04 17:51 +0000
Re: "High water" Memory fragmentation still a thing? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-10-04 16:20 -0400
Re: "High water" Memory fragmentation still a thing? mm0fmf <none@mailinator.com> - 2014-10-05 20:23 +0100
Re: "High water" Memory fragmentation still a thing? Steven D'Aprano <steve@pearwood.info> - 2014-10-06 07:20 +0000
Re: "High water" Memory fragmentation still a thing? bryanjugglercryptographer@yahoo.com - 2014-10-06 09:21 -0700
Re: "High water" Memory fragmentation still a thing? Chris Angelico <rosuav@gmail.com> - 2014-10-07 03:43 +1100
Re: "High water" Memory fragmentation still a thing? bryanjugglercryptographer@yahoo.com - 2014-10-08 10:28 -0700
Re: "High water" Memory fragmentation still a thing? Emile van Sebille <emile@fenx.com> - 2014-10-09 14:39 -0700
Re: "High water" Memory fragmentation still a thing? Chris Angelico <rosuav@gmail.com> - 2014-10-10 08:42 +1100
Re: "High water" Memory fragmentation still a thing? dieter <dieter@handshake.de> - 2014-10-10 08:09 +0200
Re: "High water" Memory fragmentation still a thing? Chris Angelico <rosuav@gmail.com> - 2014-10-10 17:52 +1100
csiph-web