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

[catnap] Enhancement: Yield to kernel #1295

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

iyzhang
Copy link
Contributor

@iyzhang iyzhang commented May 25, 2024

This PR adds a yield to Catnap into the kernel for a configurable amount of time, currently set to 1 milliseconds. This ensures that we do not continuously poll and run the CPU at 100%, while still occasionally returning to Demikernel, every second. This is safe in Catnap because there are no background coroutines, however, it does mean that every poll takes at least 1 milliseconds to complete.

@iyzhang iyzhang requested review from anandbonde and kyleholohan May 25, 2024 19:46
@iyzhang iyzhang self-assigned this May 25, 2024
Copy link

Processing commits from 7f8103a to 4312f30 (in the last 15 days)

Performance for Push() in tcp-ping-pong-server

Diff since root commit.

Diff Commit Catnip
0 4265 e3f3442 1931.03
1 4267 4b1ed79 1949.47
2 4270 ffaf885 1894.84
3 4272 c420595 2012.8
4 4274 71a0b41 2082.83
5 4278 9eb25d9 2077.19
6 4280 efbd0ae 2054.8
7 4285 a15818c 1901.17
8 4288 8447e59 1796.66
9 4295 c7d634e 1927.36
10 4298 c1c9c02 1916.63
11 4300 8ef1126 1824.32
12 4303 a56e9f9 1873.61
13 4307 e967e70 1924.73

Performance for Pop() in tcp-ping-pong-server

Diff since root commit.

Diff Commit Catnip
0 4265 e3f3442 396.753
1 4267 4b1ed79 395.685
2 4270 ffaf885 407.071
3 4272 c420595 415.161
4 4274 71a0b41 423.526
5 4278 9eb25d9 424.266
6 4280 efbd0ae 425.102
7 4285 a15818c 425.922
8 4288 8447e59 422.958
9 4295 c7d634e 401.013
10 4298 c1c9c02 403.095
11 4300 8ef1126 401.514
12 4303 a56e9f9 401.44
13 4307 e967e70 385.981

Performance for Push() in tcp-ping-pong-client

Diff since root commit.

Diff Commit Catnip
0 4265 e3f3442 1788.16
1 4267 4b1ed79 1763.86
2 4270 ffaf885 1730.35
3 4272 c420595 1757.84
4 4274 71a0b41 1741.38
5 4278 9eb25d9 1803.05
6 4280 efbd0ae 1766.08
7 4285 a15818c 1741.16
8 4288 8447e59 1573.9
9 4295 c7d634e 1686.45
10 4298 c1c9c02 1589.02
11 4300 8ef1126 1594.42
12 4303 a56e9f9 1693.54
13 4307 e967e70 1569.71

Performance for Pop() in tcp-ping-pong-client

Diff since root commit.

Diff Commit Catnip
0 4265 e3f3442 389.619
1 4267 4b1ed79 398.75
2 4270 ffaf885 395.653
3 4272 c420595 413.736
4 4274 71a0b41 416.024
5 4278 9eb25d9 406.369
6 4280 efbd0ae 416.656
7 4285 a15818c 400.591
8 4288 8447e59 405.067
9 4295 c7d634e 404.407
10 4298 c1c9c02 395.34
11 4300 8ef1126 389.707
12 4303 a56e9f9 416.822
13 4307 e967e70 370.771

Copy link

Processing commits from 7f8103a to 4312f30 (in the last 15 days)

Performance for Push() in tcp-ping-pong-server

Diff since root commit.

Diff Commit Catnap
0 4265 e3f3442 450.464
1 4267 4b1ed79 516.944
2 4270 ffaf885 440.494
3 4272 c420595 447.518
4 4274 71a0b41 517.249
5 4278 9eb25d9 597.617
6 4280 efbd0ae 457.1
7 4285 a15818c 529.453
8 4288 8447e59 492.793
9 4295 c7d634e 464.655
10 4298 c1c9c02 527.795
11 4300 8ef1126 483.754
12 4303 a56e9f9 492.433
13 4307 e967e70 500.828
14 4308 4312f30 467.46

Performance for Pop() in tcp-ping-pong-server

Diff since root commit.

Diff Commit Catnap
0 4265 e3f3442 372.509
1 4267 4b1ed79 414.03
2 4270 ffaf885 388.025
3 4272 c420595 365.31
4 4274 71a0b41 571.701
5 4278 9eb25d9 663.304
6 4280 efbd0ae 405.122
7 4285 a15818c 456.064
8 4288 8447e59 398.106
9 4295 c7d634e 405.709
10 4298 c1c9c02 482.54
11 4300 8ef1126 405.098
12 4303 a56e9f9 424.276
13 4307 e967e70 551.018
14 4308 4312f30 400.794

Performance for Push() in tcp-ping-pong-client

Diff since root commit.

Diff Commit Catnap
0 4265 e3f3442 479.605
1 4267 4b1ed79 502.064
2 4270 ffaf885 476.914
3 4272 c420595 490.128
4 4274 71a0b41 464.041
5 4278 9eb25d9 468.682
6 4280 efbd0ae 477.776
7 4285 a15818c 500.384
8 4288 8447e59 490.102
9 4295 c7d634e 432.513
10 4298 c1c9c02 441.798
11 4300 8ef1126 477.416
12 4303 a56e9f9 491.019
13 4307 e967e70 476.22
14 4308 4312f30 502.685

Performance for Pop() in tcp-ping-pong-client

Diff since root commit.

Diff Commit Catnap
0 4265 e3f3442 379.214
1 4267 4b1ed79 391.97
2 4270 ffaf885 373.839
3 4272 c420595 373.293
4 4274 71a0b41 387.314
5 4278 9eb25d9 380.885
6 4280 efbd0ae 424.6
7 4285 a15818c 433.062
8 4288 8447e59 378.485
9 4295 c7d634e 392.555
10 4298 c1c9c02 397.946
11 4300 8ef1126 372.914
12 4303 a56e9f9 406.028
13 4307 e967e70 409.092
14 4308 4312f30 540.868

Copy link

Processing commits from 7f8103a to 4312f30 (in the last 15 days)

Performance for Push() in tcp-ping-pong-server

Diff since root commit.

Diff Commit Catpowder
0 4265 e3f3442 5924.24
1 4267 4b1ed79 5436.41
2 4270 ffaf885 5102.93
3 4272 c420595 6149.59
4 4274 71a0b41 5897.01
5 4278 9eb25d9 6345.05
6 4280 efbd0ae 6154.76
7 4285 a15818c 6078.23
8 4288 8447e59 6105.55
9 4295 c7d634e 6387.95
10 4298 c1c9c02 6262.29
11 4300 8ef1126 5957.39
12 4303 a56e9f9 6311.42
13 4307 e967e70 5528.24
14 4308 4312f30 5974.09

Performance for Pop() in tcp-ping-pong-server

Diff since root commit.

Diff Commit Catpowder
0 4265 e3f3442 437.991
1 4267 4b1ed79 437.951
2 4270 ffaf885 437.099
3 4272 c420595 435.595
4 4274 71a0b41 426.753
5 4278 9eb25d9 424.626
6 4280 efbd0ae 433.992
7 4285 a15818c 436.228
8 4288 8447e59 452.783
9 4295 c7d634e 457.365
10 4298 c1c9c02 455.382
11 4300 8ef1126 468.128
12 4303 a56e9f9 440.163
13 4307 e967e70 431.17
14 4308 4312f30 413.161

Performance for Push() in tcp-ping-pong-client

Diff since root commit.

Diff Commit Catpowder
0 4265 e3f3442 6373.19
1 4267 4b1ed79 5891.16
2 4270 ffaf885 5649.32
3 4272 c420595 6361.22
4 4274 71a0b41 6295.41
5 4278 9eb25d9 5845.39
6 4280 efbd0ae 6308.07
7 4285 a15818c 10279.9
8 4288 8447e59 7363.33
9 4295 c7d634e 6543.95
10 4298 c1c9c02 6800.05
11 4300 8ef1126 6393.21
12 4303 a56e9f9 6216.34
13 4307 e967e70 6186.9
14 4308 4312f30 6331.53

Performance for Pop() in tcp-ping-pong-client

Diff since root commit.

Diff Commit Catpowder
0 4265 e3f3442 451.595
1 4267 4b1ed79 430.163
2 4270 ffaf885 426.183
3 4272 c420595 456.317
4 4274 71a0b41 449.419
5 4278 9eb25d9 496.755
6 4280 efbd0ae 448.408
7 4285 a15818c 720.37
8 4288 8447e59 688
9 4295 c7d634e 448.452
10 4298 c1c9c02 549.841
11 4300 8ef1126 439.748
12 4303 a56e9f9 429.749
13 4307 e967e70 396.228
14 4308 4312f30 446.194

@iyzhang iyzhang marked this pull request as draft May 29, 2024 16:24
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.

1 participant