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

[catpowder] Feature: Add cohosting mode to XDP backend #1470

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

Conversation

kyleholohan
Copy link
Contributor

Add a cohost setting with redirected ports specified in the config/environment as an initial take on cohosting.

Ideally, the system would do this automatically based on used ports, but there's currently no easy way to hook this up to the inetstack system.

Copy link
Contributor

@iyzhang iyzhang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

libos = catnap
commit id = cb2d284

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::catnap::transport::epoll 13178477.35 1866.87 823.50 32.97
demikernel::sgafree 11534.46 75.99 32.46 0.05
demikernel::sgaalloc 11281.32 127.13 55.01 0.11
ioc::network::libos::push;catnap::linux::transport::push 9066.12 687.79 302.91 4.27
ioc::network::libos::push 8800.49 16804.32 7398.75 6.88
demikernel::push 8800.49 548.16 239.51 0.17
ioc::network::libos::pop;catnap::linux::transport::pop 8022.44 424.65 183.15 4.07
ioc::network::libos::pop 7814.00 23238866.13 9596909.81 24.92
demikernel::pop 7814.00 542.79 231.84 0.12
ioc::network::libos::pushto 544.33 7988.65 3611.96 23.82
demikernel::pushto 544.33 515.51 230.95 1.49
ioc::network::libos::pushto;catnap::linux::transport::push 544.33 495.46 223.66 6.21
demikernel::async_close 32.50 872.96 347.33 0.01
ioc::network::libos::connect 24.95 5179453.65 2255180.72 26.94
ioc::network::libos::connect;catnap::linux::transport::connect 24.95 79304.82 34805.53 2.67
demikernel::connect 24.95 2115.94 940.60 0.01
ioc::network::libos::close 18.35 25505.03 11070.88 0.07
ioc::network::libos::close;catnap::linux::transport::close 18.35 24225.20 10510.02 95.04
demikernel::accept 15.42 1600.68 698.22 0.00
ioc::network::libos::accept 15.41 887577125.43 392240656.27 44.37
ioc::network::libos::accept;catnap::linux::transport::accept 15.39 4934.18 2109.29 0.00
demikernel::socket 9.50 155073.83 69410.31 0.33
demikernel::socket;catnap::linux::transport::socket 9.50 152729.47 68393.86 96.21
demikernel::new 1.00 258630.42 112158.93 0.13
demikernel::bind 1.00 29380.22 12727.56 0.01
demikernel::bind;catnap::linux::transport::bind 1.00 24550.18 10642.61 83.82
demikernel::listen 1.00 15555.74 6721.90 0.00
demikernel::listen;catnap::linux::transport::listen 1.00 14608.79 6313.01 93.74
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catpowder
commit id = cb2d284

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 19126573.07 701.97 307.30 85.33
bgc::inetstack::poll_recv 9563286.53 1654.22 724.44 54.31
bgc::inetstack::tcp::established::background 11282.21 1674.18 731.01 0.20
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 11282.21 474.22 211.34 23.30
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 11274.05 402.32 175.24 28.87
bgc::inetstack::tcp::established::background;tcp::established::background::sender 11232.16 938.23 401.68 24.19
ioc::network::libos::pop 9166.78 479.65 208.57 0.04
demikernel::sgafree 8843.23 111.61 48.02 0.02
ioc::network::libos::push;inetstack::push 8762.80 6319.17 2776.28 2.23
ioc::network::libos::push 8073.74 33445772.68 14161374.09 40.71
demikernel::push 8073.74 692.14 299.54 0.06
demikernel::sgaalloc 6632.04 227.29 97.10 0.04
demikernel::pop 6073.04 609.90 266.33 0.04
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 5529.46 2530.87 1097.43 1.56
ioc::network::libos::pushto 2351.67 4352.86 1855.57 5.92
ioc::network::libos::pushto;inetstack::push 2351.67 3935.62 1677.47 90.41
demikernel::pushto 2351.67 491.66 210.21 0.66
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 857.33 207.41 85.71 61.49
ioc::network::libos::close 47.33 6770.26 2960.86 0.10
ioc::network::libos::connect 41.86 41544.85 18471.30 0.57
bgc::inetstack::tcp::passiveopen::background 41.86 34439.14 15091.12 0.01
ioc::network::libos::accept 38.00 2228.13 974.67 0.00
demikernel::async_close 32.50 862.97 371.78 0.01
demikernel::accept 21.86 2160.36 956.76 0.00
demikernel::connect 20.93 4500.80 1978.37 0.03
demikernel::socket 10.30 2044.23 890.58 0.00
bgc::inetstack::arp::background 6.20 1936.77 842.15 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 6891.22 3001.34 85.38
bgc::inetstack::icmp::background 1.03 3041.40 1330.96 0.00
demikernel::new 1.00 92592194.67 40448390.79 18.85
demikernel::bind 1.00 26965.50 11623.49 0.00
bgc::inetstack::poll_recv;inetstack::poll 1.00 16094.90 7011.87 0.04
demikernel::listen 1.00 4364.86 1893.30 0.00
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnip
commit id = cb2d284

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 29916947.57 338.85 148.06 75.54
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 29916947.57 197.77 86.34 58.48
bgc::inetstack::poll_recv 14958473.78 903.65 395.29 36.75
bgc::inetstack::tcp::established::background 11093.79 1125.71 487.48 0.11
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 11093.79 332.05 144.76 26.72
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 11081.73 357.91 156.97 32.41
bgc::inetstack::tcp::established::background;tcp::established::background::sender 11039.52 321.39 129.96 14.90
ioc::network::libos::pop 9055.04 413.33 180.91 0.03
demikernel::sgafree 8765.25 82.25 36.17 0.01
ioc::network::libos::push;inetstack::push 8762.80 2037.23 930.80 0.71
ioc::network::libos::push;inetstack::push;catnip::runtime::transmit 8762.80 318.87 145.13 15.23
ioc::network::libos::push 8073.74 33375287.06 14495379.68 25.85
demikernel::push 8073.74 709.49 316.89 0.04
demikernel::sgaalloc 6518.96 141.67 62.35 0.01
demikernel::pop 6045.08 569.57 246.35 0.02
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 4593.61 2247.80 939.27 2.16
ioc::network::libos::pushto 974.00 1369.22 622.12 0.05
ioc::network::libos::pushto;inetstack::push 974.00 736.61 334.60 53.96
demikernel::pushto 974.00 496.29 225.39 0.02
ioc::network::libos::pushto;inetstack::push;catnip::runtime::transmit 974.00 281.94 128.08 38.22
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 417.00 263.36 115.27 70.28
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;catnip::runtime::transmit 57.39 615.58 268.93 3.56
ioc::network::libos::close 49.42 5943.30 2573.18 0.01
bgc::inetstack::tcp::passiveopen::background 41.86 32882.56 14802.34 0.00
ioc::network::libos::connect 41.86 32581.42 14565.80 0.04
ioc::network::libos::connect;catnip::runtime::transmit 41.86 6917.88 3087.86 22.33
ioc::network::libos::accept 38.11 2100.32 934.04 0.00
demikernel::async_close 32.50 764.01 303.47 0.00
demikernel::accept 21.86 1142.16 507.74 0.00
bgc::inetstack::tcp::passiveopen::background;catnip::runtime::transmit 20.93 16419.88 7420.48 17.65
demikernel::connect 20.93 2754.68 1223.21 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::sender;catnip::runtime::transmit 20.93 602.32 264.85 11.64
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger;catnip::runtime::transmit 18.17 1108.32 471.41 16.97
demikernel::socket 10.30 1660.27 732.56 0.00
bgc::inetstack::arp::background 6.50 2276.32 985.26 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter;catnip::runtime::transmit 6.33 1430.08 568.50 2.17
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 20750.83 9056.14 95.67
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 2.00 18505.93 8074.22 89.16
bgc::inetstack::icmp::background 1.05 3014.58 1313.94 0.00
demikernel::new 1.00 1754658541.48 765395839.40 46.66
bgc::inetstack::poll_recv;inetstack::poll 1.00 43381.27 18928.14 0.19
demikernel::bind 1.00 10342.38 4511.49 0.00
demikernel::listen 1.00 7172.00 3178.09 0.00
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catpowder
commit id = 627b928

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 18742477.97 704.07 306.52 85.59
bgc::inetstack::poll_recv 9371238.98 1652.48 719.38 53.23
bgc::inetstack::tcp::established::background 11053.34 1553.81 683.03 0.19
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 11053.34 440.48 198.73 22.17
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 11044.80 370.37 161.62 28.88
bgc::inetstack::tcp::established::background;tcp::established::background::sender 11002.89 853.32 366.38 25.00
ioc::network::libos::pop 9033.27 430.80 187.27 0.04
ioc::network::libos::push;inetstack::push 8762.74 6219.03 2732.71 2.29
demikernel::sgafree 8754.60 105.68 45.49 0.01
ioc::network::libos::push 8073.71 33492063.60 14850452.39 40.36
demikernel::push 8073.71 608.94 266.18 0.06
demikernel::sgaalloc 6509.71 141.44 62.83 0.02
demikernel::pop 6038.04 613.95 268.64 0.04
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 5281.53 2291.86 987.90 1.40
ioc::network::libos::pushto 786.33 4206.28 1728.29 2.69
ioc::network::libos::pushto;inetstack::push 786.33 3802.17 1562.28 90.39
demikernel::pushto 786.33 467.51 192.06 0.29
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 265.00 194.06 78.83 60.89
ioc::network::libos::close 47.65 6109.80 2682.00 0.09
bgc::inetstack::tcp::passiveopen::background 41.86 34534.17 14931.54 0.01
ioc::network::libos::connect 41.86 34157.49 14966.79 0.40
ioc::network::libos::accept 37.96 2968.21 1260.20 0.00
demikernel::async_close 32.50 622.62 262.10 0.01
demikernel::accept 21.86 1341.79 581.28 0.00
demikernel::connect 20.93 3871.56 1712.56 0.02
demikernel::socket 10.30 2122.04 909.69 0.00
bgc::inetstack::arp::background 6.37 1811.48 782.68 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 5817.08 2532.74 83.67
bgc::inetstack::icmp::background 1.03 3112.02 1349.55 0.00
demikernel::new 1.00 95435217.58 41643356.01 20.45
demikernel::bind 1.00 25618.69 10842.74 0.00
bgc::inetstack::poll_recv;inetstack::poll 1.00 13829.40 6025.71 0.04
demikernel::listen 1.00 3793.71 1668.97 0.00
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnap
commit id = 627b928

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::catnap::transport::epoll 13420762.22 2037.63 886.91 33.03
demikernel::sgafree 11613.98 71.42 30.78 0.05
demikernel::sgaalloc 11430.42 138.85 58.82 0.11
ioc::network::libos::push;catnap::linux::transport::push 9066.12 662.61 291.42 4.17
ioc::network::libos::push 8800.49 16667.62 7311.17 6.96
demikernel::push 8800.49 556.79 242.43 0.17
ioc::network::libos::pop;catnap::linux::transport::pop 8053.67 389.95 170.77 2.80
ioc::network::libos::pop 7844.42 3137582.84 1330350.53 25.12
demikernel::pop 7844.42 548.94 238.03 0.11
ioc::network::libos::pushto 3645.67 7783.31 3190.80 24.20
demikernel::pushto 3645.67 452.83 185.95 1.64
ioc::network::libos::pushto;catnap::linux::transport::push 3645.67 426.68 175.15 5.61
demikernel::async_close 32.50 935.53 381.16 0.01
ioc::network::libos::connect 24.95 6097359.59 2688361.63 26.43
ioc::network::libos::connect;catnap::linux::transport::connect 24.95 76515.79 33579.51 2.43
demikernel::connect 24.95 2005.55 888.61 0.01
ioc::network::libos::close 18.35 27382.60 11811.60 0.06
ioc::network::libos::close;catnap::linux::transport::close 18.35 26183.76 11290.31 95.06
demikernel::accept 15.42 1538.84 669.92 0.00
ioc::network::libos::accept 15.41 915007928.26 397449947.51 44.39
ioc::network::libos::accept;catnap::linux::transport::accept 15.39 7005.11 2999.50 0.00
demikernel::socket 9.50 153522.97 67547.36 0.23
demikernel::socket;catnap::linux::transport::socket 9.50 151313.03 66586.80 96.73
demikernel::new 1.00 270122.73 117119.09 0.11
demikernel::bind 1.00 29162.48 12592.66 0.00
demikernel::bind;catnap::linux::transport::bind 1.00 24640.32 10639.22 84.30
demikernel::listen 1.00 15268.58 6612.83 0.00
demikernel::listen;catnap::linux::transport::listen 1.00 14229.39 6164.10 93.05
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnip
commit id = 627b928

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 29616495.33 337.05 146.15 75.51
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 29616495.33 196.46 85.13 58.39
bgc::inetstack::poll_recv 14808247.67 898.72 390.14 34.73
bgc::inetstack::tcp::established::background 11187.62 1056.91 454.16 0.11
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 11187.62 302.09 130.41 25.90
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 11177.23 331.43 144.14 31.79
bgc::inetstack::tcp::established::background;tcp::established::background::sender 11135.20 291.94 117.75 15.33
ioc::network::libos::pop 9113.37 357.59 155.82 0.02
demikernel::sgafree 8780.34 78.81 34.44 0.01
ioc::network::libos::push;inetstack::push 8762.80 1969.30 886.70 0.69
ioc::network::libos::push;inetstack::push;catnip::runtime::transmit 8762.80 302.57 135.96 15.22
ioc::network::libos::push 8073.74 33377892.40 13529336.99 25.70
demikernel::push 8073.74 653.61 286.87 0.04
demikernel::sgaalloc 6535.62 125.66 54.57 0.01
demikernel::pop 6052.71 516.91 224.01 0.02
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 4644.85 2223.18 939.33 2.10
ioc::network::libos::pushto 1240.67 1295.17 583.25 0.05
ioc::network::libos::pushto;inetstack::push 1240.67 686.58 309.40 53.19
demikernel::pushto 1240.67 484.37 218.25 0.02
ioc::network::libos::pushto;inetstack::push;catnip::runtime::transmit 1240.67 248.50 111.99 36.16
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 552.33 234.72 103.65 69.73
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;catnip::runtime::transmit 151.04 547.86 237.34 3.43
ioc::network::libos::close 49.38 5676.97 2453.99 0.01
ioc::network::libos::connect 41.86 33954.47 14831.04 0.04
bgc::inetstack::tcp::passiveopen::background 41.86 32200.85 14200.63 0.00
ioc::network::libos::connect;catnip::runtime::transmit 41.86 6638.92 2975.42 21.20
ioc::network::libos::accept 38.43 2085.44 918.63 0.00
demikernel::async_close 32.50 586.96 234.00 0.00
demikernel::accept 21.86 1503.03 657.60 0.00
bgc::inetstack::tcp::passiveopen::background;catnip::runtime::transmit 20.93 15777.38 6957.46 17.24
demikernel::connect 20.93 2727.06 1209.43 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::sender;catnip::runtime::transmit 20.93 567.65 246.94 11.38
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter;catnip::runtime::transmit 13.50 225.23 103.81 0.01
demikernel::socket 10.30 2404.45 1057.72 0.00
bgc::inetstack::arp::background 6.43 2191.88 948.70 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger;catnip::runtime::transmit 5.00 1980.33 854.35 20.03
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 20212.43 8769.34 95.56
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 2.00 18003.37 7809.16 89.06
bgc::inetstack::icmp::background 1.05 2897.83 1249.39 0.00
demikernel::new 1.00 1748144347.28 757017740.15 48.78
bgc::inetstack::poll_recv;inetstack::poll 1.00 42296.97 18347.43 0.17
demikernel::bind 1.00 10498.94 4576.65 0.00
demikernel::listen 1.00 3749.14 1647.76 0.00
demikernel::close 0.00 nan nan 0.00

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.

2 participants