-
Notifications
You must be signed in to change notification settings - Fork 160
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
Border Router performance optimization #4334
Comments
This sounds great, cool that you want to tackle this! As this is a significant change, we'll want to work out a more detailed design document as described in the contribution guide once there is general agreement that this proposal should be accepted. There is some more detailed information on these design documents in my work-in-progress PR here. I should really get around to finalize this 😳 Perhaps one detail worth discussing on this level already is this; we should consider how we could add any special "slow path" handling of packets (e.g. malformed packets or SCMP traceroute), perhaps also including some form of rate limits for this, so that the "fast-path" is minimally affected. |
Summarizing some additional points from the discussion of this proposal in the chat for future reference:
Going forward, we're likely going accept this proposal. The final comment period starts now, and unless there are objections during this period, the proposal will be marked as accepted. As mentioned above, @rohrerj, you can then submit a more in-depth design document describing how you plan to implement this proposal. |
This design is remarkably similar to my fq_codel stuff (RFC8290), which does flow isolation and active queue management. One of the tricks in fq_codel to speed processing is that sparser updates are processed sooner than more bulky updates. |
No objections were raised during the final comment period, which means that this proposal is now accepted. |
Thanks for the input @dtaht. I saw that you've joined the chat, I will respond to your question over there. |
I created the PR 4339 for the design document. |
Add a low-priority slow path for special case packet handling, in particular SCMP errors and traceroutes, for the the asynchronous packet processing pipeline in the router added in scionproto#4351. This is implementation part three of three described in the design document (scionproto#4339, doc/dev/design/BorderRouter.rst). Closes scionproto#4334
Right now, the performance of the border router is strongly limited because a single goroutine per border router interface is responsible for reading, parsing, processing and forwarding the packets.
Proposal: To improve the performance of the border router we make changes to the router/dataplane.go file to separate the forwarding pipeline of each border router interface into a receiver, multiple processing routines and a forwarder, where the pool of processing routines are shared among all border router interfaces of a border router.
The receiver makes a batch read from the network socket using pre-allocated buffers from a pool and parses the source and flowID from the packet. Then we hash them to map the tuple of source and flowID to a processing routine and forward the packet to them. The processing routine will then process the packet as usual and forward the packet to the forwarder which is responsible for the egress interface. The forwarder forwards the packet to the NIC and returns the buffer used to store the packet back to the buffer pool of the receiver that received that packet.
Because of the hashing, all packets of the same source and same flowID are processed by the same processing routine and hence no packet reordering can happen.
The number of processing routines will be configurable.
These improvements are supervised by Marc Wyss from the network security group at ETH.
The text was updated successfully, but these errors were encountered: