When calling multiple function.remote() with large arguments, there seems to be memory issue.
@ray.remote
def function(args):
# do something
args={} # big dictionary
args=ray.put(args)
[function.remote(args) for _ in range(1000)]
When i ran codes like the above, ram usage kept increasing and memory leak problem occurred. From what i know, "ray.put" method writes "args" to shared memory. Therefore every process consuming the function accesses "args" in shared memory instead of copying args to each process. If it did, memory usage would not increase.
Is there anything i am confused?
ray.putsays "store this object in the object store". There will still be 1,000 copies of the object in the object store.