Will it be stored in plasma regardless of the size of the data?

Hi guys,
I use the ray.put() to store matrices of different sizes(10×10 and 1000×1000). In my imagination, the smaller matrix will be stored in the local memory buffer, the bigger matrix will be stored in the plasma.
But this did not happen,I found out from debugging information that they all called method plasma_store_provider_->Create() , so they are all stored in plasma?

All objects created by ray.put will be inside plasma object currently. We have a flag to change this behavior, but this wasn’t turned on for a long time

1 Like

@sangcho: What is the name of the flag? My understanding was the Ray would determine if the data size is greater than object store then it would spilled over plasma location (shared memory or disk). In fact, this is current ray behavior with large dataset testing.

Please, can you clarify when plasma is /dev/shm and ray will still spill to disk if it does not fit?

This is the default Ray behavior

  • If the data size is less than 100KB, it is in in-memory store. ray.put is the exception case (the object is always stored in plasma store).
  • If the data size is > 100KB, it is in the plasma store.
  • If the plasma store is full, the object is spilled to disk.

Technically, there is a lot more complex mechanism than “if the plasma store is full, the object is spilled to disk”. You can refer to the whitepaper to learn the precise memory management mechanism. Ray 1.x Architecture - Google Docs