137 points · by justincormack · 12y ago · 62 comments
Once you do some meaningful work (say, HTTP protocol decoding), this figure will be a lot lower.
Anyway I suppose the main target of this project is to help developers of packet switching and load balancing software.
If this kind of library can help us do that, that could save us a lot of time and effort. Time we could use to work on the next bottleneck :)
Snabb means fast/quick in Swedish.
(I imagine "Snabb" is closely related to "snappy" in English.)
I know Intel has software for their NIC's to enable userpace networking, but I don't think any HFT uses it. It may be all right for hobbyist experimentation. I left the industry about a year ago, so my information is a bit out-of-date, but my former employer used either Solarflare cards with the OpenOnload stack (very good cards and awesome software) or the Mellanox CX series with VMA stack (amazing hardware with mediocre software. VMA is now open-source, so perhaps that situation has improved).
Note that these cards are a few thousand dollars each, so out-of-reach for hobbyists.
Also, just in case the author of Snabb Switch is reading this, it would be really helpful to provide a short example program of how to use this. A brief look over the documentation didn't show anything. (It's possibly I just missed it. In which case it would be great if you linked to it in the README or otherwise made it prominent).
https://github.com/SnabbCo/snabbswitch/tree/master/src/desig...
Here is the driver hack that makes it possible: https://github.com/SnabbCo/snabbswitch/blob/master/src/apps/...
http://info.iet.unipi.it/~luigi/netmap/
netmap / VALE is a framework for high speed packet I/O.
Implemented as a kernel module for FreeBSD and Linux enabling memory mapped access to network devices.
[1] Look for snabb switch here: https://cast.switch.ch/vod/channels/2i5k459xe3
Because Snabb is specialized around a few specific NICs and virtual IO interfaces with specific features, it is able to do things like set up the network hardware to be memory mapped. As in, after some setup, Snabb can bang on the bits of a specific memory range and that will change bits in the network card state without the OS or even the driver being involved. This means you are not calling send() or select(), you are dealing directly with the Intel NIC hardware interface.
It sounds a lot more like game console engine programming than node.js programming. As a game console engine programmer, that's pretty interesting to me :)
There is also a podcast here http://blog.ipspace.net/2014/06/snabb-switch-and-nfv-on-open...
"I'm the Snabb Switch originator.
The project is new: I and other open source contributors are currently under contract to build a Network Functions Virtualization platform for Deutsche Telekom's TeraStream project [1] [2]. This is called Snabb NFV [3] and it's going to be totally open source and integrated with OpenStack.
Currently we are doing a lot of virtualization work from the "outside" of the VM: implementing Intel VMDq hardware acceleration and providing zero-copy Virtio-net to the VMs. So the virtual machine will see normal Virtio-net but we will make that operate really fast.
Inside the VMs we can either access a hardware NIC directly (via IOMMU "PCI passthrough") or we can write a device driver for the Virtio-net device.
So, early days, first major product being built, and lots of potential both inside and outside VMs, lots of fantastic products to build with nobody yet building them :-)"
What are they talking about?
Given that servers are getting 10Gb, 40Gb or more, this is becoming more and more of an issue. The hardware is capable of it, but the abstractions are getting in the way.
Reading it again, it sounds more holistic -- that a simplified, monolithic application with a local, lightweight database is much higher performance than, for instance, an n-tier, distributed database type solution.