Improving Netgraph Concurrency
Author: I-Hsuan (Ethan) Huang (ihh@FreeBSD.org)
Project description
- The FreeBSD netgraph system, a flexible, graph-based networking subsystem, plays a pivotal role in the FreeBSD operating system's network infrastructure. However, its current implementation faces challenges in concurrency and performance due to reliance on lock-based mechanisms. This project aims to enhance the netgraph system by introducing a lockless data passage model. By replacing traditional locking mechanisms with lockless data structures and epoch-based reclamation, the project seeks to improve the efficiency and reliability of data passage within netgraph, ensuring seamless and high-performance network operations.
Approach to solving the problem
This project will focus on the following steps:
- Replace traditional locking mechanisms with lockless data structures.
- Implement epoch-based reclamation to manage resources efficiently.
- Ensure that the modifications maintain or improve current performance benchmarks.
- Test the changes extensively with various scenarios, including both stateless and stateful node interactions.
The workflow will include:
- Implementing and verifying the new lockless model.
- Documenting the changes and updating the API usage guides.
- Developing a comprehensive test suite.
- Running performance benchmarks.
- Ensuring compatibility with existing netgraph nodes and functionalities.
Deliverables
- A modified netgraph system supporting lockless operations.
- Comprehensive documentation covering the implemented changes.
- A robust test suite for validating the lockless model.
- Performance benchmarks demonstrating improvements.
- Compatibility assurance with existing functionalities.
Milestones
(5-10 milestones, with dates, indicating when you hope or expect to be able to complete features. This section is mandatory. Please negotiate these with your mentor to make sure you're not under- or over-estimating the amount of work to be done. Please also make sure the following four dates are included within your milestones)
- May 21: Start of coding
- July 9-13: Mid-term Evaluations
- August 13: End of coding (soft)
- Oct 7: End of coding (hard)
- Research and Planning
- Development of Core API Modifications
- Initial Testing with Stateless Nodes
- Iterative Conversion and Testing of Nodes
- Final Testing and Compatibility Assurance
Test Plan
- Develop a comprehensive test suite to validate the functionality and performance of the lockless model.
- Conduct tests in various scenarios, including stateless and stateful node interactions.
- Use performance benchmarks to compare the efficiency of the lockless model with the existing lock-based model.
- Ensure compatibility with existing netgraph nodes and functionalities.
The Code
This is an ongoing project. You can explore the project's code and track its progress on Github - Netgraph