Repository navigation
Conversation
✅ Deploy Preview for meta-velox canceled.
|
f205aec to
2b7539a
Compare
850bcde to
6aa7238
Compare
|
@karthikeyann @dan13bauer @devavret I'd appreciate reviews from as many of you who have time here. |
Selective Build Plan
Selective build plan |
devavret
left a comment
There was a problem hiding this comment.
Worth confirming if this is a real issue. Feel free to mark resolved if you think this is a false positive.
| if (queue != nullptr) { | ||
| queue->terminate(); | ||
| } |
There was a problem hiding this comment.
I let my agent look for ordering issues and it found this:
UcxOutputQueueManager.cpp:240 terminates the old queue only after releasing taskLifecycleMutex_. A replacement initializeTask() can therefore clear cancellation and publish its new queue first. The old queue’s pending getData callback then wakes its old exchange server; that server publishes an end marker and calls deleteResults() using only (taskId, destination) (UcxExchangeServer.cpp:308). It can consequently terminate or delete data from the new task’s queue. Keep queue termination within the retirement boundary, or attach a generation/incarnation ID to queue callbacks and registry keys. The new lifecycle test covers cancellation ordering, but not this pending-callback handoff.
There was a problem hiding this comment.
I agree that this is a real race. Fixed in 17df2fb
|
Thanks @vyasr for this rather substantive PR. Clearly, the existing code does not enable the intra-node path when the consumer starts before the producer's queue exists.
|
Thanks for the comments @dan13bauer! These are fair questions. Since I've only recently been ramping up on the Velox-cudf work, I have not run benchmarks nearly as frequently or on as diverse of hardware as some of the other devs, so I'll ask them to chime in. @devavret @karthikeyann @GregoryKimball @kjmph could you comment more here? I'm happy to collect some more data but my understanding is that all of you have already been encountering these problems fairly frequently and could comment today. |
|
@vyasr @dan13bauer This issue was found a long time ago and I don't have the exact performance numbers at hand but on the hardware I was running (DGX 8xB200 nvlinked), it seemed to happen quite often and the performance drop was about 30%. This is from hazy memory though but I also recall it happening on an NVL72. |
|
I've run a simple test on our 8xA100 platform: TPC-H, sf-1000, with and without this PR, otherwise everything the same. This is not conclusive, I'm putting it here to have a data point. Also, the configuration is suboptimal, it is just meant as a relative comparison. Arithmetic mean of runs 2–5, excluding the first lukewarm run. Times are in seconds. Positive percentages mean
The patched version's total is 3.1713 seconds lower. It wins 10 queries, |
|
openucx/ucx#11319 should give us the majority of the benefits of this PR. Prior to finding that PR I independently found that the main reason for the slow transfers we're observing is that UCXX error handling is turned on by default in Velox, and as a result we are unable to go to the local copy path. Enabling that properly in UCX is a better fix. The other smaller factor I encountered is that for small messages, the rendezvous scheme that UCX chooses may still result in PCIe transfers unless we explicitly disable that by forcing the rendezvous scheme with |
|
openucx/ucx#11319 is now merged, so I'll need to redo benchmarks here and assess the value of this improvement. |
This PR fixes a bug where if a consumer checked if intra-node exchange was supported before any producer arrived to fill the queue, the exchange queue would immediately and incontrovertibly disable intra-node exchange. This PR fixes that by adding a callback mechanism that implements a handshake for the producer and consumer once both are in place. Since an arbitrary number of callbacks could be registered with the communicator, the communicator executes them in bounded chunks to avoid starving the rest of the system of resources.
To support testing these changes, this PR also implements per-source runtime metrics for transport decisions and payloads. These metrics are used to ensure in various testing scenarios that the expected intra-node transport is in fact occurring when it should be.