Memory allocation strategies using ray.init

Hi,
Just wanted recommendations on the memory related parameters in ray.init api. The service we’re building is an event based listener where the listener is spawned with indefinitely running workers using ray.remote.
My question is:
Given the service container running with 5GB of RAM. what are the considerations one would use for the memory related parameters like _memory, object_store_memory and redis_max_memory. ??
The service is less CPU intensive but more IO intensive in terms of its functionality.

Ray automatically sets those parameters based on the amount of available RAM, though you’re free to change those parameters (it’s no clear that you need to though).

I think the only reason you would need to change any of the defaults is if you are running into OOM errors, or you know you’re trying to do some advanced out of core processing.

1 Like

Thanks @Alex for answering my query. Leaving everything to Ray figure out memory related values didn’t work well as ray.init continuously failed while running pytests in local macbook. hence, was wanting considerate values to set for proper initialization.

^ Can you elaborate why it happens?

btw @satishdash, it may also help to look at how Ray’s high level unit tests are configured here. Or look into using our cluster utils for multi node unit tests.