[BUG] Spilling logic can spill data that cannot be freed #6864
Labels
cudf_dependency
An issue or PR with this label depends on a new feature in cudf
performance
A performance related task/issue
reliability
Features to improve reliability or bugs that severly impact the reliability of the plugin
The spill code in RapidsBufferStore will spill data from a buffer that is currently not spillable. This can be very wasteful when the thread that has locked the buffer is busy blocked on an allocate call that is causing spilling to occur. Such buffers cannot be freed to satisfy the allocation, and spilling them in the hopes the buffer can be relinquished later can be a complete waste of time and I/O bandwidth if the buffer is never unlocked.
Rather than spilling all buffers, the code should track spillable (i.e.: not currently acquired) buffers and only spill those. The waiting logic for pending free buffers should be changed to waiting logic for buffers to be released (and thus spilled only at that point).
The text was updated successfully, but these errors were encountered: