Skip to content
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

[Refactor] refactor migration scheduler #66

Merged
merged 3 commits into from
Nov 15, 2024
Merged

[Refactor] refactor migration scheduler #66

merged 3 commits into from
Nov 15, 2024

Conversation

KuilongCui
Copy link
Contributor

@KuilongCui KuilongCui commented Nov 5, 2024

The current migration logic is somewhat confusing, as the filter contains the logic for sorting instances by load. In the refactored logic, we aim to adhere to the Single Responsibility Principle as much as possible:

  1. The MigrationFilter will only handle filtering-related logic, with specific filter strategies determined by pair_migration_type.
  2. The PairMigrationPolicy will process the source and destination instance information after filtering.

Copy link

github-actions bot commented Nov 5, 2024

prefill p25 p50 p75 p95 p99 mean
latency(ms) 33707.14 106413.80 200891.57 243231.90 246857.76 116510.99
decode p25 p50 p75 p95 p99 mean
latency(ms) 52.74 58.43 68.37 116.33 215.33 66.80

Copy link

github-actions bot commented Nov 5, 2024

migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 312.00 MB 320.00 MB 472.00 MB 536.00 MB 544.00 MB 560.00 MB 728.00 MB
rpc_speed(GB/s) 1.03 1.52 1.79 1.91 2.03 2.08 2.17 2.13 2.17 2.23 2.30 2.38 2.41 2.45 2.29 2.43 2.54 2.58 2.44 2.47 2.46 2.43 2.54 2.58 2.68 2.80 3.13 2.96 2.96 3.19 3.07
migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 312.00 MB 472.00 MB 536.00 MB 560.00 MB 688.00 MB 736.00 MB 960.00 MB
gloo_speed(GB/s) 1.02 1.67 2.08 2.42 2.68 2.74 2.79 2.84 2.85 3.06 3.44 3.52 3.60 3.41 3.14 2.75 2.54 3.06 1.77 2.27 3.09 2.84 2.98 3.58 2.78 2.76 3.09 2.85 2.94 3.04 2.96
migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 312.00 MB 336.00 MB 376.00 MB 480.00 MB 488.00 MB 544.00 MB 552.00 MB 560.00 MB 568.00 MB 688.00 MB 728.00 MB 960.00 MB
nccl_speed(GB/s) 0.19 0.40 0.60 0.73 0.93 1.08 1.21 1.32 1.63 1.83 2.09 2.45 2.33 2.45 2.27 2.34 2.73 3.13 3.59 3.82 3.23 3.68 3.38 3.69 4.79 5.26 5.94 5.84 4.48 4.19 4.06 4.37 5.50 6.85 5.74

Copy link
Contributor

@s5u13b s5u13b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. May be we should add the auto-scaling e2e test in the future.

@KuilongCui KuilongCui changed the title [Bugfix] Fix the bug that allows migration before establishing migration communication group [Refactor] refactor migration scheduler Nov 11, 2024
@KuilongCui KuilongCui force-pushed the rebuild_rebug branch 2 times, most recently from aa2c6f9 to c1a70c0 Compare November 11, 2024 06:51
Copy link

migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 200.00 MB 208.00 MB 232.00 MB 280.00 MB 312.00 MB 472.00 MB 480.00 MB 544.00 MB 552.00 MB 960.00 MB
rpc_speed(GB/s) 1.09 1.63 1.86 2.03 2.11 2.22 2.31 2.30 2.42 2.42 2.52 2.51 2.59 2.55 2.62 2.66 2.58 2.70 2.68 2.67 2.68 2.60 2.75 2.73 2.69 2.76 2.94 2.81 2.98 3.18 3.23 3.33 3.36 3.69
migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 200.00 MB 216.00 MB 288.00 MB 312.00 MB 320.00 MB 336.00 MB 344.00 MB 480.00 MB 560.00 MB 568.00 MB
gloo_speed(GB/s) 1.01 1.68 2.10 2.45 2.48 2.69 2.88 2.79 3.19 3.09 2.96 3.60 3.67 3.97 3.30 3.00 2.58 1.88 2.73 2.57 1.50 3.15 2.83 2.92 2.85 3.68 3.40 3.39 3.39 4.18 3.77 3.04 2.91 3.17

Copy link
Contributor

@s5u13b s5u13b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewing

Copy link

prefill p25 p50 p75 p95 p99 mean
latency(ms) 22153.28 65582.49 108632.85 148149.97 151150.15 66590.02
decode p25 p50 p75 p95 p99 mean
latency(ms) 52.78 55.48 62.65 103.08 198.50 61.47

Copy link
Contributor

@s5u13b s5u13b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr seems a bit over-design for me. I don't quite understand the necessity here.

llumnix/global_scheduler/migration_scheduler.py Outdated Show resolved Hide resolved
Copy link

migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 200.00 MB 216.00 MB 224.00 MB 320.00 MB 344.00 MB 368.00 MB 472.00 MB 536.00 MB 696.00 MB 960.00 MB
rpc_speed(GB/s) 1.10 1.65 1.93 2.10 2.08 2.30 2.36 2.41 2.45 2.45 2.50 2.51 2.58 2.61 2.63 2.65 2.63 2.57 2.48 2.64 2.52 2.68 2.72 2.73 2.74 2.97 2.65 2.44 2.95 3.03 3.18 3.39 3.42 3.78
migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 224.00 MB 232.00 MB 312.00 MB 336.00 MB 344.00 MB 352.00 MB 560.00 MB 696.00 MB
gloo_speed(GB/s) 1.05 1.64 2.11 2.41 2.58 2.73 3.03 2.99 3.11 3.43 3.03 3.52 2.81 3.17 3.32 2.97 2.77 3.10 2.92 3.04 2.88 3.00 3.06 2.94 4.07 0.77 3.09 3.48 4.02 4.04 3.15 2.87

Copy link

prefill p25 p50 p75 p95 p99 mean
latency(ms) 14193.58 59013.98 129412.58 150639.29 152151.83 66652.76
decode p25 p50 p75 p95 p99 mean
latency(ms) 53.20 56.93 65.99 99.86 147.35 62.15

Copy link

prefill p25 p50 p75 p95 p99 mean
latency(ms) 7655.60 53606.06 117234.86 147139.14 168672.04 62216.60
decode p25 p50 p75 p95 p99 mean
latency(ms) 52.08 55.82 64.49 109.39 238.70 63.93

Copy link

migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 176.00 MB 200.00 MB 208.00 MB 248.00 MB 304.00 MB 352.00 MB
rpc_speed(GB/s) 1.11 1.61 1.88 2.06 2.13 2.20 2.30 2.31 2.41 2.42 2.44 2.52 2.59 2.58 2.57 2.64 2.64 2.69 2.81 2.87 2.69 2.86 2.26 2.53 3.10 3.32
migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 184.00 MB 192.00 MB 312.00 MB
gloo_speed(GB/s) 0.99 1.67 2.00 2.38 2.54 2.67 2.83 3.10 3.07 3.10 2.85 3.21 3.47 2.98 3.56 2.31 2.87 2.68 3.02 2.93 1.60 2.40 2.29 2.95 1.78

llumnix/global_scheduler/migration_filter.py Show resolved Hide resolved
llumnix/global_scheduler/migration_filter.py Outdated Show resolved Hide resolved
llumnix/global_scheduler/migration_filter.py Outdated Show resolved Hide resolved
llumnix/global_scheduler/migration_filter.py Outdated Show resolved Hide resolved
llumnix/global_scheduler/migration_policy.py Show resolved Hide resolved
llumnix/global_scheduler/migration_filter.py Show resolved Hide resolved
Copy link

migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 168.00 MB 184.00 MB 192.00 MB 200.00 MB 208.00 MB 280.00 MB 560.00 MB
rpc_speed(GB/s) 1.06 1.55 1.82 1.96 2.10 2.18 2.18 2.24 2.29 2.42 2.46 2.51 2.50 2.57 2.62 2.57 2.58 2.58 2.67 2.63 2.93 2.74 2.65 2.68 2.88 3.30
migration_size 8.00 MB 16.00 MB 24.00 MB 32.00 MB 40.00 MB 48.00 MB 56.00 MB 64.00 MB 72.00 MB 80.00 MB 88.00 MB 96.00 MB 104.00 MB 112.00 MB 120.00 MB 128.00 MB 136.00 MB 144.00 MB 152.00 MB 160.00 MB 168.00 MB 176.00 MB 192.00 MB 200.00 MB 208.00 MB 216.00 MB
gloo_speed(GB/s) 1.02 1.70 2.03 2.47 2.52 2.74 2.83 3.11 3.11 3.49 2.99 3.33 3.22 3.31 3.31 2.37 2.24 2.84 3.20 2.79 2.94 2.86 2.26 3.36 3.50 3.88

Copy link

prefill p25 p50 p75 p95 p99 mean
latency(ms) 23088.66 47944.24 110676.57 142799.81 156045.68 62858.89
decode p25 p50 p75 p95 p99 mean
latency(ms) 52.27 57.75 71.68 125.52 254.69 67.58

@KuilongCui KuilongCui merged commit bcd49ba into main Nov 15, 2024
14 checks passed
@KuilongCui KuilongCui deleted the rebuild_rebug branch November 15, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants