Why on CentOS, python consumes too much memory ?

Michael Torrie torriem at gmail.com
Thu Jul 18 15:51:21 CEST 2013


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.



More information about the Python-list mailing list