How to clear used Ray RAM

When I run something like ray.nodes() or ray.available_resources(), it appears these commands increase the RAM used in the Ray head memory.

When I monitor the used RAM through the Ray Dashboard, I don’t see the used RAM going down. I am wondering if anyone has seen this behavior, or if there is something that I might be missing that clears the RAM usage correctly.

1 Like

Resolved. In our case, we created a custom function that invokes both ray.init(ray://remote-address) and then do ray.available_resources(). Looks like ray.shutdown() is not being automatically called at the end in our case for some reason.