Userspace network stack and netchannels.
Subsystems (2)
Hi.
I've released new version of the extremely small userspace netowork stack [1] implementation. Stack supports TCP and UDP over IP.
It works on top of netchannels [2] or packet socket (returned back in this release).
Supported features:
* TCP/UDP sending and receiving.
* Timestamp, window scaling, MSS TCP options.
* PAWS.
* Slow start and congestion control.
* Socket-like interface.
* Retransmit and fast retransmit support.
* support for TCP listen state (only point-to-point mode, i.e. no new data channels are created, when new client is connected, instead state is changed according to protocol (TCP state is changed to ESTABLISHED).
* support for the netchannels and packet socket interface.
It was proven [3] that unetstack can be *much* faster than vanilla TCP stack (mainly because of heavily reduced number of syscalls, different congestion control algorithm and other features).
This release includes number of bugs fixed (thanks to Salvatore Del Popolo for continuously kicking me), packet socket interface (enabled at compile time) and small documentation update (including example).
Attached archive for intrested readers.
Thank you.
1. Userspace network stack.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=unetstack
2. Netchannel subsystem.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=netchannel
3. Gigabit send/recv benchmark for netchannels and sockets using small packets.
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_10_26.html
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_12_21.html
Signature · 1 line
Evgeniy Polyakov
Evgeniy,
Quoted 7 lines · Evgeniy Polyakov
I've released new version of the extremely small
userspace netowork stack [1] implementation.1. Userspace network stack.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=unetstack
Quoted 8 lines
2. Netchannel subsystem.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=netchannel3. Gigabit send/recv benchmark for netchannels and sockets using small packets.
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_10_26.html
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_12_21.html
Very interesting. Are there any details of your benchmarking available, namely, how it was done?
Have you some comparison profiling data (oprofile) to figure out where the advantages are coming from?
Signature · 14 lines
Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool. -- Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool.
Quoted 21 lines · On Tue, 25 Sep 2007 22:00:48 +0400 Evgeniy Polyakov <[email protected]> wrote:
Hi.
I've released new version of the extremely small userspace netowork stack [1] implementation. Stack supports TCP and UDP over IP.
It works on top of netchannels [2] or packet socket (returned back in this release).Supported features:
* TCP/UDP sending and receiving.
* Timestamp, window scaling, MSS TCP options.
* PAWS.
* Slow start and congestion control.
* Socket-like interface.
* Retransmit and fast retransmit support.
* support for TCP listen state (only point-to-point mode, i.e. no new data channels are created, when new client is connected, instead state is changed according to protocol (TCP state is changed to ESTABLISHED).
* support for the netchannels and packet socket interface.
Quoted 3 lines
It was proven [3] that unetstack can be *much* faster than vanilla TCP stack (mainly because of heavily reduced number of syscalls, different congestion control algorithm and other features).
I am glad to see a more complete implementation for comparison, but by changing several variables at once it makes it hard to evaluate whether the improvement comes from user space TCP or the other changes.
Quoted 7 lines · Stephen Hemminger
Quoted 3 lines
It was proven [3] that unetstack can be *much* faster than vanilla TCP stack (mainly because of heavily reduced number of syscalls, different congestion control algorithm and other features).
I am glad to see a more complete implementation for comparison, but by changing several variables at once it makes it hard to evaluate whether the improvement comes from user space TCP or the other changes.
Number of issues were improved - mostly reduced number of syscalls (if size of the message increases results become essentially the same). Different (non-rfc-compliant) congestion control algorithm allows faster start and recovery, but in slower links (or longer rtt) it can be wrong. Originally it was created to show superiority of the netchannel architecture, but several hundreds of percents in some cases is not result of peer-to-peer and process context processing. This stack works with netchannels, which just became a link between hardware and user, such approach allows huge variety of usage for different network hardware including safe offloading, sniffing and so on. This stack is an example.
Signature · 1 line
Evgeniy Polyakov
Hi Robert.
Quoted 10 lines · Robert Iakobashvili
Quoted 5 lines
3. Gigabit send/recv benchmark for netchannels and sockets using small packets.
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_10_26.html
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_12_21.htmlVery interesting. Are there any details of your benchmarking available, namely, how it was done?
Have you some comparison profiling data (oprofile) to figure out where the advantages are coming from?
Those are throughput tests - one sender, one receiver with different size of the packet being sent/received. CPU usage was determined via /proc statistics. My analysis says that reduced number of syscalls is main improvement factor, but different (non-rfc-compliant) congestion control allows faster start and faster recovery.
Signature · 1 line
Evgeniy Polyakov
Quoted 11 lines · Evgeniy Polyakov
Quoted 8 lines
Quoted 3 lines
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_10_26.html
http://tservice.net.ru/~s0mbre/blog/devel/networking/2006_12_21.htmlVery interesting. Are there any details of your benchmarking available, namely, how it was done?
Have you some comparison profiling data (oprofile) to figure out where the advantages are coming from?My analysis says that reduced number of syscalls is main improvement factor,
Great! Just oprofile of the comparison tests is of my curiosity.
Quoted 2 lines
but different (non-rfc-compliant) congestion
control allows faster start and faster recovery.
People like compliance to standards, even if it decreases performance. :) Take care.
Signature · 6 lines
Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool.
Evgeniy,
Those numbers look impressive. How mysterious do things get in SMP? Sorry havent had time to stare at the code. How do you measure cpu you quoted?
cheers,
jamal
Hi Jamal.
Quoted 3 lines · jamal
Those numbers look impressive. How mysterious do things get in SMP? Sorry havent had time to stare at the code. How do you measure cpu you quoted?
I did not checked how netchannels and userspace stack behaves on SMP just because I do not have SMP test machines. Getting into account that netchannels have smaller number of locks (actually only one to queue skb) compared to sockets, it should not behave worse, but I did not test that.
CPU usage was obtained via /proc/$pid statistics.
Signature · 1 line
Evgeniy Polyakov