Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.059 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'exceeds': 0.09; 'locale': 0.09; 'subject:Why': 0.09; 'python': 0.11; 'antoine': 0.16; 'determining': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:too': 0.16; 'subject:python': 0.16; 'subject: ?': 0.16; 'all.': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'app': 0.19; 'memory': 0.22; 'header:User-Agent:1': 0.23; 'file.': 0.24; 'script': 0.25; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'words': 0.29; 'libraries': 0.31; 'problem': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'described': 0.36; 'ram': 0.36; 'shows': 0.36; 'too': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'resource': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'impact': 0.61; 'show': 0.63; 'determine': 0.67; 'caused': 0.69; 'william': 0.81; '"too': 0.84; 'bai': 0.84; 'leak': 0.84; 'leak,': 0.84; 'skip:/ 30': 0.84; 'usage.': 0.84; 'subject:much': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Thu, 18 Jul 2013 07:51:21 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Why on CentOS, python consumes too much memory ? References: <9c8ca067-a230-406a-95f6-12af80da1728@googlegroups.com> <0ee7b61b-5fcd-406c-b3ac-44aeb949e7e9@googlegroups.com> In-Reply-To: <0ee7b61b-5fcd-406c-b3ac-44aeb949e7e9@googlegroups.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374155491 news.xs4all.nl 15951 [2001:888:2000:d::a6]:49590 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50857 On 07/18/2013 03:13 AM, William Bai wrote: > I found that it was caused by not by python but by > /usr/lib/locale/locale-archive, the same problem as that described > in http://illiterat.livejournal.com/4615.html. Too funny. So in other words there isn't a problem at all. What you thought was RAM usage was really just a memory-mapped file. That's why Antoine said that using VSS to determine memory usage is not valid at all in determining memory footprint. VSS shows all kinds of things from shared libraries to locale archives that have zero impact on RAM usage. Every app will show at least the size of glibc in its VSS number. What is "too much memory" anyway? What do you mean by "consume too much memory?" Now if your script has a resource leak and is long-running, then that's a problem, but the solution is to fix your resource leak, not have the OS kill your app when it exceeds the RLIMIT.