Skip to content

feat: coordinate parent selector and piece collector for better bandwidth usage#1578

Open
SouthWest7 wants to merge 18 commits intodragonflyoss:mainfrom
SouthWest7:feat/select-lb
Open

feat: coordinate parent selector and piece collector for better bandwidth usage#1578
SouthWest7 wants to merge 18 commits intodragonflyoss:mainfrom
SouthWest7:feat/select-lb

Conversation

@SouthWest7
Copy link
Member

Description

This PR improves bandwidth utilization during task downloads by enhancing the coordination between the Pparent Selector and the Piece Collector.

The piece collector is extended to

  • proactively collect a sufficient number of parent peers,
  • enabling the parent selector to make more effective scheduling decisions at download time.

In the presence of unstable parent peers, the implementation gracefully falls back to the previous behavior to maintain reliability.

Related Issue

dragonflyoss/dragonfly#3713

Motivation and Context

Screenshots (if appropriate)

Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.76%. Comparing base (2c4ad66) to head (59dc5be).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/resource/piece_collector.rs 0.00% 32 Missing ⚠️
dragonfly-client/src/resource/parent_selector.rs 0.00% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1578      +/-   ##
==========================================
- Coverage   42.84%   42.76%   -0.09%     
==========================================
  Files          75       75              
  Lines       21184    21268      +84     
==========================================
+ Hits         9077     9095      +18     
- Misses      12107    12173      +66     
Files with missing lines Coverage Δ
dragonfly-client/src/resource/task.rs 7.33% <ø> (ø)
dragonfly-client/src/resource/parent_selector.rs 0.00% <0.00%> (ø)
dragonfly-client/src/resource/piece_collector.rs 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gaius-qi gaius-qi added the enhancement New feature or request label Jan 5, 2026
@gaius-qi gaius-qi modified the milestones: v2.4.0, v2.5.0 Jan 5, 2026
@SouthWest7
Copy link
Member Author

SouthWest7 commented Jan 6, 2026

Test

Env

  • Bandwidth: 1GiB
  • Piece Concurrent: 16
  • File Size: 30GiB
  • Scenario: Single Task

Result

  • Metrics: Completion Time (T1–T10)
Version T1 T2 T3 T4 T5 T6 T7 T8 T9 T10
origin (left) 29s 86s 86s 86s 87s 87s 87s 87s 87s 89s
improved (right) 29s 49s 49s 49s 49s 49s 50s 50s 50s 50s
origin wait

Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Signed-off-by: Southwest <1403572259@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants