On Thu, May 28, 2020 at 3:51 PM Rahul Gupta <rahulgupta100...@gmail.com> 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. One of the > easiest way is to restart the system but i dont want to restart i want a way > to do this when the system is up and running. Kindly tell me how to do this. > Thanks >
The Python garbage collector is irrelevant once you have terminated Python. I suggest you look elsewhere in your system - if 50GB of RAM is still in use after the Python process has ended, it's not being used by Python. Also, that's an awful lot of RAM, but a surprising amount. Are you sure it's not 128GB? I don't know where you got your information from regarding the "poor performance" of the Python GC, but without citations, it's nothing but FUD. ChrisA -- https://mail.python.org/mailman/listinfo/python-list