diff --git a/en/projects/netperf/index.sgml b/en/projects/netperf/index.sgml index 0a7f651cc6..2e83de2915 100644 --- a/en/projects/netperf/index.sgml +++ b/en/projects/netperf/index.sgml @@ -1,196 +1,235 @@ - + %includes; N/A"> Done"> In progress"> Needs testing"> New task"> Unknown"> %developers; ]> &header;

Contents

Project Goal

The netperf project is working to enhance the performance of the FreeBSD network stack. This work grew out of the SMPng Project, which moved the FreeBSD kernel from a "Giant Lock" to more fine-grained locking and multi-threading. SMPng offered both performance improvement and degradation for the network stack, improving parallelism and preemption, but substantially increasing per-packet processing costs. The netperf project is primarily focussed on further improving parallelism in network processing, while reducing the SMP synchronization overhead. This in turn will lead to higher processing throughput and lower processing latency.

Project Strategies

Robert Watson

The two primary focuses of this work are to increase parallelism while decreasing overhead. Several activities are being performed that will work towards these goals:

Project Tasks

+ + + + + + + + + + + + + + + +
Task Responsible Last updated Status Notes
Mbuf queue library &a.rwatson; 20041106 &status.wip; In order to facilitate passing off queues of packets between network stack components, create an mbuf queue primitive, struct mbufqueue. The initial implementation is complete, and the primitive is now being applied in several sample cases to determine whether it offers the desired semantics and benefits. The implementation can be found in the rwatson_dispatch Perforce branch.
Employ queued dispatch in interface send API &a.rwatson; 20041106 &status.wip; An experimental if_start_mbufqueue() interface to struct ifnet has been added, which passes an mbuf queue to the device driver for processing, avoiding redundant synchronization against the interface queue, even in the event that additional queueing is required. This has not yet been benchmarked.
Employ queued dispatch in the interface receive API &a.rwatson; 20041106 &status.new; Similar to if_start_mbufqueue, allow input of a queue of mbufs from the device driver into the lowest protocol layers, such as ether_input_mbufqueue.
Modify UMA allocator to use critical sections not mutexes for + per-CPU caches. &a.rwatson; 20041111 &status.wip; The mutexes protecting per-CPU caches require atomic operations + on SMP systems; as they are per-CPU objects, the cost of + synchronizing access to the caches can be reduced by combining + CPU pinning and/or critical sections instead. A prototype of this + has been implemented in the rwatson_percpu branch, but is waiting + on critical section performance optimizations that will prevent + this change from negatively impacting uniprocessor performance. +
Optimize critical section performance &a.jhb; 20041111 &status.wip; Critical sections prevent preemption of a thread on a CPU, as + well as preventing migration of that thread to another CPU, and + maybe used for synchronizing access to per-CPU data structures, as + well as preventing recursion in interrupt processing. Currently, + critical sections disable interrupts on the CPU. In previous + versions of FreeBSD (4.x and before), optimizations were present + that allowed for software interrupt disabling, which lowers the + cost of critical sections in the common case by avoiding expensive + microcode operations on the CPU. By restoring this model, or a + variation on it, critical sections can be made substantially + cheaper to enter. In particular, this change will lower the cost + of critical sections on UP such that it is approximately the same + cost as a mutex, meaning that optimizations on SMP to use critical + sections instead of mutexes will not harm UP performance. A + prototype of this change is present in the jhb_lock Perforce + branch.

Links

Some useful links relating to the netperf work:

&footer;