Ram memory not freed after executing python script on ubuntu system

Peter J. Holzer hjp-python at hjp.at
Thu May 28 18:02:13 EDT 2020


On 2020-05-27 22:49:53 -0700, Rahul Gupta wrote:
> I am having a Ubuntu system which has 125 Gb of RAM. I executed few
> python scripts on that system. Those scripts uses numpy arrays and
> pandas. Now execution was over but still 50 gb of RAM and 2 Gb cache
> and 8.4 Gb of swap is occupied. At this moment nothing is running on
> the system. I have googled it. Most of th result shows that python
> garbage collector is poor in performance. I want this memory to be
> cleaned and re claim.

As others have already pointed out, a process which doesn't exist can't
use memory (on Linux or any other sane OS). So either python is still
running or something else is using the memory.

To find out what is using the memory, run the command
    top
in a terminal. Then press Shift-M to sort processes by memory
consumption. The offenders should now be at the top.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp at hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20200529/5d6761c4/attachment.sig>


More information about the Python-list mailing list