Facebook Seeks Devs To Make Linux Network Stack As Good As FreeBSD's
An anonymous reader writes Facebook posted a career application which, in their own words is 'seeking a Linux Kernel Software Engineer to join our Kernel team, with a primary focus on the networking subsystem. Our goal over the next few years is for the Linux kernel network stack to rival or exceed that of FreeBSD.' Two interesting bullet points listing "responsibilities": Improve IPv6 support in the kernel, and eliminate perf and stability issues. FB is one of the worlds largest IPv6 deployments; Investigate and participate in emerging protocols (MPTCP, QUIC, etc) discussions,implementation, experimentation, tooling, etc.
Why not use FreeBSD? It's already there and at least as good as linux. Or have they perhaps hung themselves on systemd?
I like Linux as much as the next guy, but FreeBSD has the advantage of being a complete OS, not simply a kernel with a userland. No matter how tight the code, how well implemented, FreeBSD will likely always have the better TCP/IP stack. As I'm fond of telling people, if I ran my own company, it would be Linux on the desktops and FreeBSD/OpenBSD on the servers.
It might be a silly question, but why don't they just use FreeBSD in that case?
Look, this is FreeBSD ... why not just take their damned code?
It's not like you're not allowed to do that. That's what is great about the BSD license.
If FreeBSD's network stack is what you aspire to, why reinvent the wheel?
Lost at C:>. Found at C.
Backwards compatibility with In-Q-Tel required.
Insulting their work might not be the right way to get the best Linux kernel network engineers to join your company.
What makes the FreeBSD network stack superior?
Hire Linus
what a beautiful job of trolling Torvalds et al
Step 1: Use FreeBSD
Step 2: There is no step 2.
Because that would make sense.
Why not just merge the TCP/IP stack into systemd like everything else? :D
I was only half joking. This is something where I have anxieties about a younger developer (who didn't grow up with UNIX culture and philosophy) building a net/firewall/security/IIS type monolithic binary (with binary logs) in response to this.
I try to stay optimistic, but you know.
Userland has little to do with in-kernel TCP/IP stack... Your argument is invalid.
-=/\- Jizzbug -/\=-
They are still missing the mark. The Solaris has the best performing stack. They should go hire up some of the Sun Micrsystem programmer that are looking to leave Oracle.
True that one can not just copy the code. But if you get the engineers that made the best, you can at least get the best improvement.
It used the FreeBSD networking code. This doesn't mean windows is fast and it's sort of specious. BSD has tricks in the Kernel to make I/O faster that pretty much anything else.
Need Mercedes parts ?
I don't understand why there's all these comments saying they should just use FreeBSD. There are many reasons to despise Facebook but their desire to improve the Linux networking stack is admirable. We should be encouraging corporations to contribute to OSS, not telling them to just use that other thing that is better in some ways but not others. Kudos to them for contributing back to the projects they use.
What effect does the userland have on the TCP/IP stack?
Designing algorithms that play well in a SMP environment under heavy loads is not easy. It isn't just a matter of locking within the protocol stack... contention between cpus can get completely out of control even from small 6-instruction locking windows. And it isn't just the TCP stack which needs be contention-free. The *entire* packet path from the hardware all the way through to the system calls made by userland have to be contention-free. Plus the scheduler has to be able to optimize the data flow to reduce unnecessary cache mastership changes.
It's fun, but so many kernel subsystems are involved that it takes a very long time to get it right. And there are only a handful of kernel programmers in the entire world capable of doing it.
-Matt
Except when you start talking about netmap. :) That's a userspace network stack that can push millions of pps, on sub-GHz systems.
There's even a netmap-enabled version of the IPFW packet filter that runs in userspace, filtering millions of pps on sub-GHz systems.
And there's an applications ecosystem starting to grow around netmap that keeps all network-related packet processing in userspace.
As a twist, netmap and IPFW are also available on Linux, and provide better performance than the in-kernel network stack and iptables. :)
Best TCP/IP stack on the market today (Solaris 11.2)
Facebook actually did something I approve of?
I'm not sure I want to live in this world anymore.
Windows is simply out of the league. Cheap toy for pleb.
And why would it be such a bad thing, even if you had to? I maintain a handful of ports myself and people's complaining about rebuilding them always irks me — what am I missing?
There are, of course, precompiled binary packages for almost all the ports (where licensing allows redistribution of such binaries). But I don't use them myself — building everything from source. Why not?
In Soviet Washington the swamp drains you.
Who says they will give back anything?
Anytime you add the word "user" to anything, it only has negative effect
As a FreeBSD developer I now understand why it's becoming so easy to get jobs in big Linux camps. ... no matter how big feet a developer may have, just kicking the pig won't make it fly.
Guess what
ports/games/fortunes-data-jokes :)
I don't know why it's a bad thing, I don't think it's a bad thing, but people are always complaining about it and no only is it not a big deal.. it's not even required.. I was pointing it out :-)
is fine, ZFS however is licensed under the CDDL which is incompatible with GPLv2 (and probably a bunch of other stuff).
It is also a decidely *LESS* free license than BSD, although depending on what you're concerned with it may be more free than the GPL, but regardless it's not compatible with GPL and is only compatible with BSD insofar as the released work could be licensed under the CDDL without running afoul of conflicting license provisions unlike CDDL/GPLv2.
Hardware support, in particular, is very far behind
Amusingly, I had the opposite problem years back. The wireless drivers and stack were better on BSD, while on Linux they were hard to find, and often you ended up having to use ndiswrapper which was a nightmare (often resulting a decision between "do I upgrade my kernel and fix X, or keep my kernel and have working wifi").
Just taking a quick peek, it looks like USB3.0 works, but it depends on your host-controller whether it's supported or not.
Oh I see, get rid of performance issues.
Why not just write it out to avoid confusion?
they figured a firewall belongs into the kerneld after all
They will probably optimize it the way they optimize their news feeds: drop 80% and randomize the rest.
https://www.youtube.com/watch?v=g7tvI6JCXD0
FreeBSD also includes an alternative to select/poll called kqueue that allows it to scale client connections massively with minimal performance degradation. Linux introduced epoll as a work-alike, but it has some drawbacks ...
http://www.eecs.berkeley.edu/~sangjin/2012/12/21/epoll-vs-kqueue.html
What's a massive scale? WhatsApp, recently acquired by Facebook, uses FreeBSD and Erlang to power it's service offerings. They sustain over 2 million simultaneous client connections per FreeBSD server ...
http://blog.whatsapp.com/196/1-million-is-so-2011
I wouldn't be surprised if the internal comparison between Linux and FreeBSD network features/performance was fueled by feedback from their new subsidiary.
FreeBSD also works very closely with the Nginx community. If you look at the dev mailing list, you will see a fair amount of kernel level dev work sponsored by companies that use nginx on top of FreeBSD. This constant tuning keeps nginx consumers loyal to FreeBSD for obvious reasons. There is no wonder why this combination was selected by NetFlix to power their new content delivery network.
FreeBSD also works very closely with the Nginx community
Both nginx and memcached were written by active FreeBSD devs and were developed for FreeBSD in mind. The *BSD community in general loves portability and clean code, so these programs also run great on Linux.
...slightly less, now.
FreeBSD also includes an alternative to select/poll called kqueue that allows it to [snip]
Once again, you're bragging about something everyone supports.
Linux calls it epoll /dev/poll or something (I forget)
Solaris calls it
Linux introduced epoll as a work-alike, but it has some drawbacks ...
http://www.eecs.berkeley.edu/~sangjin/2012/12/21/epoll-vs-kqueue.html
All of the interfaces work fine in nginx and http://libevent.org/
I'm sure you can find some strong argument that the BSD interface is more elegant because it almost always is, but unfortunately, no one cares. kqueue might have a performance advantage, but if so it does not have the kind decisive performance advantage the job posting suggests it might.
and there is also kevent in Linux. As usual Linux is a mess in this area, and there are lots of ways to optimize programs with lots of file descriptors (http://bulk.fefe.de/scalability/ ), and this is only one of them. tl;dr linux works fine with lots of file descriptors.
Which works great if you're writing all your own software, or are able to rely on nothing but open source. VERY few companies have that luxury, and FreeBSD/OpenBSD are a non-starter for anything you want vendor support on. RHEL and SLES on the other hand are almost universally supported by hardware and software vendors alike.
My objection was not to merits or lack thereof of a particular OS, but to the practice of placing the burden of research on the audience (and opponents).
Whatever it is you are stating, should be backed by evidence. It is best to include the links with the statement being supported, but it can be tedious. So, links should be provided upon request — without any lip like "just google it yourself"...
In Soviet Washington the swamp drains you.