memory consumption

Alexey zen.supagood at gmail.com
Wed Mar 31 04:26:57 EDT 2021


вторник, 30 марта 2021 г. в 18:43:54 UTC+3, Alan Gauld:
> On 29/03/2021 11:12, Alexey wrote: 

> The first thing you really need to tell us is which 
> OS you are using? Memory management varies wildly 
> depending on OS. Even different flavours of *nix 
> do it differently. 

I'm using Ubuntu(5.8.0-45-generic #51~20.04.1-Ubuntu) in
development and Centos 7 in production

> However, most do it effectively, so you as a programmer 
> shouldn't have to worry too much provided you aren't 
> leaking, which you don't think you are.
> > and after second run it weighs 1Gb. If I will continue 
> > to run this class, memory wont increase, so I think 
> > it's not a memory leak, but rather Python wont release 
> > allocated memory back to OS. Maybe I'm wrong.
> A 1GB process on modern computers is hardly a big problem? 
> Most machines have 4G and many have 16G or even 32G 
> nowadays. 

In case of one worker it's ok. But when 8 workers holding 8Gb 
of garbage it becomes a problem and I cant ignore this due 
to company rules.


More information about the Python-list mailing list