-
Notifications
You must be signed in to change notification settings - Fork 122
vine: starvation in worker transfers #4116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Glad you found it, I'm not quite sure that I understand the solution. Make a PR? |
Will do that. |
Per our discussion today, the problem:
Proposed solution:
Question: Why exactly do we distinguish between @colinthomas-z80 what do you think? |
My understanding was that replication transfer jobs are send out with I think some of our code operated under the assumption that Now that we introduced the worker managing its transfer bandwidth maybe we need to modify the way the worker interprets |
Careful - The problem is that transfers don't currently get started unless somebody calls |
Resolved in #4130 |
Uh oh!
There was an error while loading. Please reload this page.
I'm fairly certain this is the primary issue causing the significant slowdown at the end of large workflows.
Previously, I tried plotting the number of incoming and outgoing transfers on each worker to check whether file transfers were fast enough and whether they might be the bottleneck. I consistently observed that the manager scheduled transfers early on, but never received responses indicating whether the transfers succeeded or failed. I initially assumed this was a bug in the plotting logic.
For example, the following figure shows the number of incoming transfers on each worker (each line represents a worker). It seems that some transfers got stuck on certain workers without making any progress:
It turned out that there was a bug in the worker's file fetching logic. In
vine_cache_ensure
, the worker forks a process to fetch files from other workers (same thing as vine_transfer_server.c does), and the number of concurrent fetch processes is limited byc->max_transfer_procs
. However, once this threshold is reached, additional transfers are silently delayed forever.This creates a serious issue: the manager enforces a throttle (
q->worker_src_max_transfers
, default 10) per worker, assuming that each scheduled transfer is actively being handled. If a transfer never completes and no response is returned, the manager incorrectly assumes the worker is still busy and avoids scheduling further transfers to it.My tentative solution is pretty straightforward and gives me consistently great performance: the concurrency throttle is still 10, but we periodically check the pending transfers and try to shcedule them in the worker's main loop. The funciton looks like:
It turned out that the manager’s throttle can be set to a very large value (e.g., 10000), while each worker handles the incoming and outgoing concurrency. All transfers (regardless of success or failure) complete very fast without causing delays.
The text was updated successfully, but these errors were encountered: