Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Facebook Seeks Devs To Make Linux Network Stack As Good As FreeBSD's

timothy posted about 3 months ago | from the high-praise-all-around dept.

Facebook 195

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.

Sorry! There are no comments related to the filter you selected.

This does pose the question: (1, Insightful)

Anonymous Coward | about 3 months ago | (#47615343)

Why not use FreeBSD? It's already there and at least as good as linux. Or have they perhaps hung themselves on systemd?

Re:This does pose the question: (4, Informative)

HuguesT (84078) | about 3 months ago | (#47615573)

I love FreeBSD, I support them financially every year, and I use it daily but it is not uniformly better than Linux. Hardware support, in particular, is very far behind. Two random examples:

1- My NAS system does not recognise any USB storage when they are plugged in after boot (no hotplug). It does not support USB superspeed (USB 3.0) either (I have to boot in compatibility mode by disabling xHCI in the BIOS). This is a known issue with some Asus motherboards, still unfixed in 10.0
2- FreeBSD does not install on some of my HP G6 servers. The kernel simply segfaults. I really wanted FreeBSD on this hardware, so I run it in a VM under Linux (using KVM). Has been running brilliantly for about 2 years now.

Also security update in FreeBSD are really difficult. I haven't finished dealing with updating my ports since I moved from 9.2 to 9.3 last week.

I have to say this though: when it runs, it runs really well.

Re:This does pose the question: (4, Interesting)

ci4 (98735) | about 3 months ago | (#47615959)

USB3 support in FreeBSD 10 is OK (bunch of external disks used for PC backup - speed was essential). No problem with hot-plug either. Ports upgrade is trivial (although I have switched to pkg-ng now). I really can't find why do you think that security updates are difficult either. I've got only one 9.2 system around which I at the moment am not bothered to upgrade.

Re:This does pose the question: (0)

Anonymous Coward | about 3 months ago | (#47616299)

I see this a lot on IRC... People, you do not have to rebuild your ports just because you updated. With the exception of something like, a third party driver that links against the kernel, or maybe one or two random small things, everything else still runs.. Just make sure you installed the compat package for the previous version.

Why not rebuild your ports? (1)

mi (197448) | about 3 months ago | (#47616617)

People, you do not have to rebuild your ports just because you updated.

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?

Re:This does pose the question: (2)

jdew (644405) | about 3 months ago | (#47615997)

What asus board? I've got an asus crosshair iv formula and the usb3 has been working fine in both 9.2 and 9.3. The aibs driver doesn't support this board yet though.

as for security updates:
freebsd-update fetch; freebsd-update install

and port updates:
portsnap fetch update; portmaster -gda

So not sure what the issues are here.

Re:This does pose the question: (4, Interesting)

TheRaven64 (641858) | about 3 months ago | (#47616047)

I'm pretty sure that Facebook buys enough hardware that they can afford to write drivers for anything they're missing and demand FreeBSD support from vendors for their next round of purchases. Netflix already does this (they won't buy any hardware that doesn't have vendor support for FreeBSD), as do a few other companies, and so a number of NIC vendors (particularly in the 10G/40G space) are now putting quite a bit of effort into their FreeBSD drivers.

Re:This does pose the question: (4, Informative)

lgw (121541) | about 3 months ago | (#47616293)

If you have 1 million Linux machines deployed, with full Linux-specific software stacks on each, it's cheaper and easier (and most likely faster) to fix the problems you see in Linux than to move the fleet to a new OS.

Facebook's dev shop culture is all about banging out code as fast as possible for the problem in front of them, then moving on. Forward planning isn't really the thing there, from what I hear (though I think you're no longer discouraged from testing your code before it goes live, that's a recent change). Moving to BSD might well be a better long term plan, but it would take years to get there and they don't really think on that timescale, from the rumors I hear anyhow.

Re:This does pose the question: (1)

Anonymous Coward | about 3 months ago | (#47616633)

> I think you're no longer discouraged from testing your code before it goes live, that's a recent change

You think you are making facebook look like idiots, but all you are doing is casting doubt on your own credibility.
Extraordinary claims like that demand extraordinary proof.

Re:This does pose the question: (4, Insightful)

Pieroxy (222434) | about 3 months ago | (#47616301)

Don't you think it's easier and cheaper to optimize the network stack of Linux rather than writing tons of hardware drivers for FreeBSD? Hardware which, most of the time, will be undocumented. Furthermore, when you change your servers, yay, more drivers to write...

Re:This does pose the question: (2)

Score Whore (32328) | about 3 months ago | (#47616703)

Facebook buys custom servers, so will be 100% documented. Also they are of the vanity free variety lacking any bolted on bits added strictly to make the numbered list of features on the side of the box longer. I suspect that the only thing they are going to care about are disks and nics. Sounds cards, video cards, random USB hardware, bluetooth, none of that matters to them at all. These are datacenter housed pieces of equipment.

Re:This does pose the question: (4, Interesting)

Fweeky (41046) | about 3 months ago | (#47616075)

pkgng's made port upgrading much less burdensome - even fairly complex dependency changes can be handled automatically as of 1.3, and the official package repositories are a lot more useful now. They even have stable security-fix-only branches.

I still make my own customised builds, but I make binary packages in an isolated jail using poudriere. 99% of upgrades are a matter of updating its ports tree, running rebuild-packages, and running pkg upgrade on all my machines.

You couldn't pay me to go back to portupgrade/portmaster/portmanager.

Re:This does pose the question: (-1)

Anonymous Coward | about 3 months ago | (#47616183)

Why under Linux and not a hypervisor? You are giving up a bit of performance by sticking Linux in the middle.

Re:This does pose the question: (0, Insightful)

Anonymous Coward | about 3 months ago | (#47616609)

The binary package manager is a pain in the ass in FreeBSD. Linux and FreeBSD are a royal pain in the ass to recompile from source and mix binary packages, as there's entire chains of dependency hell you have to go through if you need X but not Y.

FreeBSD's hardware support isn't quite as diverse as Linux, but that's mostly in the "desktop" department. I'd say the hardware support is superior on FreeBSD for server platforms, as there's less "cooks in the kitchen"

Where Linux is terribly weak though is on networking. There is no support for network card features designed to improve performance or reduce buffer bloats. Linux insists on doing absolutely everything on the CPU, and as much in user-space as possible, so from a security point of view it has some advantages in that design, but from a performance point of view, this is what makes it awful as a virtual machine OS, because there's multiple layers of virtual CPU's doing things in software that it should be doing in hardware.

Won't Happen (0, Interesting)

Anonymous Coward | about 3 months ago | (#47615357)

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.

Re:Won't Happen (2)

fuzzyfuzzyfungus (1223518) | about 3 months ago | (#47615627)

Why is the organizational separation between the kernel and the userland going to affect the quality of the TCP/IP stack?

Re:Will Happen (1)

Jizzbug (101250) | about 3 months ago | (#47615663)

Userland has little to do with in-kernel TCP/IP stack... Your argument is invalid.

Re:Will Happen (2)

phoenix_rizzen (256998) | about 3 months ago | (#47616035)

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. :)

Re:Won't Happen (0)

Anonymous Coward | about 3 months ago | (#47615791)

The TCP/IP stack is inside the kernel. :)

Re:Won't Happen (4, Interesting)

TheRaven64 (641858) | about 3 months ago | (#47616085)

Actually, that's not always true. FreeBSD ships with netmap, which allows you to talk to the network hardware directly from userspace. A significant chunk of the DNS root zone is served by FreeBSD boxes using a completely custom TCP/IP stack on top of netmap. There's a paper at this year's SIGCOMM about building specialised network stacks in this infrastructure.

If you're talking about the FreeBSD TCP/IP stack, then libuinet [wanproxy.org] allows running it entirely in userspace.

These might not be the ones that Facebook is interested in, but a significant amount of their workload could be sped up by using the work described in the SIGCOMM paper...

Huh? (1)

Millennium (2451) | about 3 months ago | (#47615951)

What effect does the userland have on the TCP/IP stack?

Why not just use FreeBSD then? (1, Insightful)

johanwanderer (1078391) | about 3 months ago | (#47615381)

It might be a silly question, but why don't they just use FreeBSD in that case?

Re:Why not just use FreeBSD then? (2)

halivar (535827) | about 3 months ago | (#47615455)

If they've done a lot of work already on a custom kernel, it may not make sense to try porting all that work to completely different kernel architecture. They may have done a cost benefit analysis and decided that the cost of improving their current architecture is less than retrofitting FreeBSD. Not saying this is the case, just posing a possible scenario where this would be the better option.

Re:Why not just use FreeBSD then? (0, Funny)

Anonymous Coward | about 3 months ago | (#47615459)

So our solution to them having one great platform that could be improved in one area is to throw out the entire platform and adopt another one which would need to be improved in several areas? Are you a PHB?

Re:Why not just use FreeBSD then? (4, Funny)

discord5 (798235) | about 3 months ago | (#47615461)

It might be a silly question, but why don't they just use FreeBSD in that case?

You haven't heard? I'm sorry... My condolences, but the writing had been on the wall for a while though. Netcraft even confirmed it years ago...

*BSD is dying.

Re:Why not just use FreeBSD then? (-1)

Anonymous Coward | about 3 months ago | (#47615517)

*BSD isn't dying its still active and where linux gets most of its GOOD code from

Re:Why not just use FreeBSD then? (0)

Anonymous Coward | about 3 months ago | (#47615533)

They were making this thing called a joke. It's a pretty new invention so I'm not surprised you've never heard of it before.

Re:Why not just use FreeBSD then? (1)

K. S. Kyosuke (729550) | about 3 months ago | (#47616521)

BSD doesn't support jokefs.

Re:Why not just use FreeBSD then? (1)

gstoddart (321705) | about 3 months ago | (#47615597)

Isn't Netcraft dead?

Because people have been saying the BSDs are dying for night on 20 years now, possibly longer.

Re:Why not just use FreeBSD then? (1)

devphaeton (695736) | about 3 months ago | (#47615605)

Ye gods I'm so tired of this 'joke' cropping up every so often. It wasn't really that funny 12 years ago, either.

Re:Why not just use FreeBSD then? (-1)

Anonymous Coward | about 3 months ago | (#47615625)

Can i massage your prostate with my cock head?

Re:Why not just use FreeBSD then? (0)

Anonymous Coward | about 3 months ago | (#47615905)

Yes! But please be careful with that beak.

Re:Why not just use FreeBSD then? (2)

dr.Flake (601029) | about 3 months ago | (#47616019)

Ye gods I'm so tired of this 'joke' cropping up every so often. It wasn't really that funny 12 years ago, either.

Actually,

i still find the dying remark funny.
And the more time has passed, the funnier it gets. As still being around and still being a relevant OS proves how silly the study was at the time.

So i hope we can still laugh about it in 30 years or so.

Re:Why not just use FreeBSD then? (1)

gstoddart (321705) | about 3 months ago | (#47616229)

So i hope we can still laugh about it in 30 years or so.

You know, anybody who knows that joke now ... in 30 years or so will be sitting in the old geeks home laughing into their beard for reasons nobody else understands.

And, yes, I consider myself among them ... now, if you'll excuse me, I should get started on my beard.

Why not just use FreeBSD then? (0)

Anonymous Coward | about 3 months ago | (#47615531)

Because that would make sense.

Re:Why not just use FreeBSD then? (2)

HuguesT (84078) | about 3 months ago | (#47615595)

May be multiple issues. Perhaps better OpenMP support ? maybe NUMA ? Maybe Linux has a better virtual machine infrastructure ? maybe hardware support.

Re:Why not just use FreeBSD then? (0)

Anonymous Coward | about 3 months ago | (#47615695)

I would bet it's because hadoop/hbase and other bigdata stuff are better supported on linux

Re: Why not just use FreeBSD then? (0)

Anonymous Coward | about 3 months ago | (#47616713)

Missing drivers for their cache system, file systems, basically open rack hardware support is a linux project.

LOL, so why not use theirs? (5, Insightful)

gstoddart (321705) | about 3 months ago | (#47615385)

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?

Re:LOL, so why not use theirs? (4, Insightful)

Bengie (1121981) | about 3 months ago | (#47615429)

You can't just copy/paste code and expect it to work, it must be refactored, and may not even be compatible until completely new features are added in the current code to allow the new code to function. It's like saying "that fusion reactor is an open design, why not just place that in our coal power plant?". You may need to make some changes to your current power plant before you change its core.

Re:LOL, so why not use theirs? (0)

Anonymous Coward | about 3 months ago | (#47615747)

technically, if the reactor produces heat to turn water into steam, it's almost a drop-in replacement for coal. it's why so many power producers were able to switch from coal to gas so quickly.

Re:LOL, so why not use theirs? (0)

Anonymous Coward | about 3 months ago | (#47615781)

How about converting your prop plane into a jet?

Re:LOL, so why not use theirs? (1)

Anonymous Coward | about 3 months ago | (#47616111)

Still produces forward thrust, I'd say it's a drop-in replacement - nothing to it :P

Remember Microsoft Windows? (1)

rs79 (71822) | about 3 months ago | (#47615797)

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.

Re: Remember Microsoft Windows? (0, Insightful)

Anonymous Coward | about 3 months ago | (#47615911)

BSD doesn't use tricks, at least not any that Linux doesn't use.

The problem with Linux is two-fold. 1) feature creep. Look at the Linux code and then at the FreeBSD code. Linux is totally convoluted, partly because of the million random patches that have touched the code. BSDs are much more systematic when adding or changing features. It's a tighter knit community.

2) Linux has had a ton of real-time patches applied. Generally speaking, real-time algorithms and tweaks will run slower overall. There's often a tradeoff between efficiency and low-latency.

Re:Remember Microsoft Windows? (2)

Dahan (130247) | about 3 months ago | (#47616447)

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.

No it didn't. A few utilities that nobody used (e.g., the commandline ftp.exe, which doesn't even support PASV mode) were ported from BSD (not even FreeBSD), but the TCP/IP stack in Windows was not from BSD.

Re:Remember Microsoft Windows? (0)

Anonymous Coward | about 3 months ago | (#47616649)

> It used the FreeBSD networking code. This doesn't mean windows is fast and it's sort of specious.

Early versions of NT shipped with a couple of bsd-derived userland utilities like telnet. But the network stack in the kernel had no significant amount of bsd code. So yeah, 'sort' of specious is an understatement.

Re:LOL, so why not use theirs? (1)

petermgreen (876956) | about 3 months ago | (#47616233)

Coal to gas conversion is pretty easy (though the result won't be as efficient as a combined cycle plant desgined to run on GAS). You just have to add some gas jets and gas piping to the combustion chamber. The design of the boiler and it's operating pressure can stay much the same and any extra physical space requirements are minimal.

That doesn't mean coal to other things will be anywhere near as easy even if the fundamental "boiling water drives steam tubine" bit remains. You have to think of the physical location requirements of the new steam source, the steam pressures it can provide without overheating (AIUI nuclear power plants tend to run at lower temperature/pressure than coal fired ones).

In the case of fusion it is expected that to achive breakeven fusion plants will have to be BIG.

Re:LOL, so why not use theirs? (1)

TheRaven64 (641858) | about 3 months ago | (#47616109)

Quite a few consumer router manufacturers actually ship Linux with the FreeBSD network stack grafted onto it. I don't know why.

Re:LOL, so why not use theirs? (0)

Anonymous Coward | about 3 months ago | (#47615441)

Licensing? Can code released under the BSD license be re-released under the GPL?

Re:LOL, so why not use theirs? (1)

mccoma (64578) | about 3 months ago | (#47615513)

IANALBIHHTSF It can be included in a GPL project, but there is no provision in the BSD license to change the BSD licensed code to GPL. I would bet there is already some BSD code in the Linux kernel, so it shouldn't be a big deal.

Re:LOL, so why not use theirs? (1)

maliqua (1316471) | about 3 months ago | (#47615675)

there is a lot of bsd code in the linux kernel bsd is probably the least restrictive license so basically bsd code can be used by anyone for any reason

Re:LOL, so why not use theirs? (1)

Hadlock (143607) | about 3 months ago | (#47615917)

Like Apple... meet OSX

Re:LOL, so why not use theirs? (1)

mccoma (64578) | about 3 months ago | (#47615977)

That's about what I said, except you just cannot change the license on the code itself. Some folks think you can strip the copyright and license from BSD code and that just isn't so.

Re:LOL, so why not use theirs? (3, Insightful)

gstoddart (321705) | about 3 months ago | (#47615565)

Licensing? Can code released under the BSD license be re-released under the GPL?

Been years since I read the license, but the BSD licenses are pretty permissive, to the extent you can take BSD stuff and use it as a basis for commercial products.

BSD has always been about writing awesome code, and letting people do what they want with it, as opposed to imposing ideology on people.

I'd be surprised if Linux doesn't already have code from FreeBSD in it.

Re:LOL, so why not use theirs? (1)

devphaeton (695736) | about 3 months ago | (#47615611)

It does. Lots.

Re:LOL, so why not use theirs? (0)

Anonymous Coward | about 3 months ago | (#47616555)

Please provide examples.

Re:LOL, so why not use theirs? (3)

mi (197448) | about 3 months ago | (#47616735)

Check your /usr/include/X11/extensions/fontcachstr.h for example. Or, to put us back on topic of FreeBSD networking, the <netinet/igmp.h>, <netinet/if_ether.h>, and <net/ethernet.h>...

Re:LOL, so why not use theirs? (2, Informative)

Anonymous Coward | about 3 months ago | (#47615929)

Licensing? Can code released under the BSD license be re-released under the GPL?

IANAL.

Sort of. Technically, as you are (presumably) not the copyright holder of the work, you would have no permission to grant any sort of copyright license to third parties.

But the license used by FreeBSD is very permissive. Anyone is permitted to copy, modify, redistribute, or redistribute modified versions of the software and essentially the only requirement is that you also include the three parts of the license text, verbatim, somewhere in all copies.

So what this allows you to do is to create a modified version of the software. If your modifications are non-trivial, they may be a copyrightable work themselves. You may license your modifications to others under the terms of the GPL. The result is a combined work, with portions of it under the GPL license, and portions of it under the terms of the FreeBSD license. This works because someone can distribute the combination and simultaneously satisfy the conditions of both licenses: in addition to the GPL requirements, one must also include the text as required by the FreeBSD license.

Re:LOL, so why not use theirs? (0)

Anonymous Coward | about 3 months ago | (#47616207)

Did you miss the part where they aid they want the Linux networking stack to be better than FreeBSD's? You can make a better solution if you simply copy someone else's.

Re:LOL, so why not use theirs? (0)

Anonymous Coward | about 3 months ago | (#47616563)

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?

FreeBSD people would be fine with that. It is the Linux side that forbids the import. The license is too free to include in the kernel. They don't like zfs there either.

Requirements (0)

Anonymous Coward | about 3 months ago | (#47615391)

Backwards compatibility with In-Q-Tel required.

Biggest troll on Slashdot ever (2)

CAPSLOCK2000 (27149) | about 3 months ago | (#47615409)

Insulting their work might not be the right way to get the best Linux kernel network engineers to join your company.

Re:Biggest troll on Slashdot ever (3, Funny)

Anonymous Coward | about 3 months ago | (#47615481)

Insulting their work might not be the right way to get the best Linux kernel network engineers to join your company.

Or it might be the best way ever. Linux people and their egos....

Re:Biggest troll on Slashdot ever (1)

Zapotek (1032314) | about 3 months ago | (#47615537)

How is that an insult? As a coder (software engineer/developer/whatever) myself I'm always glad when people point out things in my systems that can be improved. The possibility of someone hiring someone else to improve them for me, that'd make me ecstatic. This isn't about egos, this is about getting stuff done right.

Re:Biggest troll on Slashdot ever (0)

Anonymous Coward | about 3 months ago | (#47615831)

Oh horseshit. This would be a dream job for a kernel developer; "we'll pay you well to make this thing not suck."

How many job descriptions in software development has, as a premise, improving an important code base? 99.9% of software work is piling one new feature or workaround on top of another, stacking steaming shit piles ever higher. Here, Facebook is offering to pay people to improve a code base to compete with an excellent rival in a highly visible way.

If you don't think that will stroke the ego of the sort of people that contribute to Linux then you don't understand who the fuck you're talking about.

Re:Biggest troll on Slashdot ever (1, Insightful)

rogoshen1 (2922505) | about 3 months ago | (#47616091)

Yes, but Facebook. Somewhere between working for the SS and Big Tobacco.

FreeBSD network stack (4, Insightful)

CadentOrange (2429626) | about 3 months ago | (#47615471)

What makes the FreeBSD network stack superior?

Re:FreeBSD network stack (4, Funny)

gstoddart (321705) | about 3 months ago | (#47615511)

Way more cowbell, and a much cooler logo.

Re:FreeBSD network stack (0)

maliqua (1316471) | about 3 months ago | (#47615535)

FBSD essentially always wins who has the fastest network stack contests, sets internet speed records etc.

it just is always has been slightly a head.

There is a reason why juniper uses it to base junos on

Re:FreeBSD network stack (5, Informative)

Zarjazz (36278) | about 3 months ago | (#47615631)

As someone who has used various BSD's and Linux in large scale environments, and is a fan of both, I've configured servers with multi-10Gb interfaces and handling 100k+ requests a second I honestly can't think of any example of where Linux has been inferior. The often repeated line that FreeBSD has a better networking stack was probably true over 10 years ago with Linux 2.2 and earlier, but since then I'd say that myth is just bullcrap.

Maybe Facebook are talking about some specific IPv6 or cutting edge features like MPTCP they need on their network, but as a general statement it's utterly misleading.

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47615649)

I've always wondered too.

Could someone please provide a explanation that does not demand me to read the entire stack code?

Re:FreeBSD network stack (-1)

Anonymous Coward | about 3 months ago | (#47615669)

IPv6 support in FreeBSD has better performance and resource usage. Some cutting edge protocols are being pioneered on FreeBSD. This isn't surprising; the FreeBSD network stack has been kept very efficient through more thoughtful design and FreeBSD has had the benefit of some really brilliant developers gravitating around FreeBSD for new protocol development. FreeBSD had a real IPv6 stack before Linux, better firewall design including sophisticated rate limiting techniques and other wins.

There are some good reasons FreeBSD still has a loyal base of developers and users, the network stack being not the least of these.

Re:FreeBSD network stack (4, Informative)

Bengie (1121981) | about 3 months ago | (#47615685)

A lot of sysadmins from companies that push a lot of data over lots of connections have blogs about tweaking your OS to handle stuff like 10gb+ of traffic and millions of connections. A lot of these people complain about Linux having strange problems under these loads, and FreeBSD just seems to work. Linux may be faster in some cases, but it still has stability issues that are hard to debug.

Then there's the whole thing about most network stack research happening primarily on FreeBSD because of licensing. There's a new zero-copy network API that was developed in FreeBSD that allows line rate 64byte 10gb traffic on a 450mhz quadcore cpu. Linux and old-api FreeBSD were about 1/10th the packets-per-second.

A new thread friendly socket API has just been pushed to FreeBSD 11. One of Netflix' engineers had a pet project that now allows near zero lock-contention thread scaling. He was able to done line speed 40gb/s with 150k TCP sessions. Instead of having one file descriptor with a single listening thread, you instead have one file-descriptor and listening thread per MSS queue from the NIC and you can lock your thread to the same CPU as the MSS queue, so the packet is already in L2 cache. No shared network state. This also means no share locks with nearly perfect linear scaling and virtually no cache trashing or bouncing.

They're starting work for extend the API to also allow the OS to better handle NUMA and to attach the MSS queues to the CPU to which the NIC is attached. This will virtually remove all cross-talk among the CPU cores trying to handle the network state.

They're looking into expanding this same concept to the Storage IO system.

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47615793)

Very informative, thanks.

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47615827)

Thank you.

Re:FreeBSD network stack (1, Troll)

mvdwege (243851) | about 3 months ago | (#47615855)

[citation needed]

I really want to believe you are sincere and everything you say is true. Unfortunately, you don't seem to have provided any references.

This is the Web. Hyperlinks exist for a reason. Use them.

Re:FreeBSD network stack (3, Informative)

phoenix_rizzen (256998) | about 3 months ago | (#47615979)

Google searches for "netmap" and "FreeBSD" will give you lots of information on pushing millions of pps through 900 MHz single-core machines. Netmap is also available on Linux. There's even a netmap-enabled version of IPFW that allows you to do packet filtering and routing completely in userspace, again will millions of pps. IPFW is also available on Linux, although I don't know if the netmap-enabled version is.

Google searches for "openconnect" and "FreeBSD" will give you lots of information and blog posts from the Netflix guys about why they picked FreeBSD, and how it all works, including details on the networking.

Google searches for "Adrian Chadd", or "RSS scaling", or similar terms will show you threads and posts on various FreeBSD mailing lists with information detailing a lot of the MSS/RSS work that's going into FreeBSD 11, and several projects that build off that. Those also have links to other information around sockets and similar.

Google searches for "NUMA" and "FreeBSD" will bring up mailing list threads that cover the different projects being undertaken to improve the CPU affinity and thread locality and all that jazz.

Sure, it would be nice if the OP had posted links to the info, but it's not like the information is secret or hard to find.

Re:FreeBSD network stack (1, Redundant)

mi (197448) | about 3 months ago | (#47616797)

Google searches for ...

Sorry, but no. The onus is on you — one making the claim — to offer links supporting it.

You Google it, you pick the links you deem most suitable, you embed them in your posting.

Making the reader do it is not only impolite, it also makes it easier to attack your argument (that FreeBSD is superior) — the Google search could very well offer a link to some blog saying "FreeBSD networking sucks"...

Re:FreeBSD network stack (1)

Anonymous Coward | about 3 months ago | (#47616009)

I'm really getting tired of people like you: This is not a scientific publication, and this is not for sure wikipedia, this is a forum where people expose opinions. Want citations? Go back to the fucking Wikipedia and please DO verify some of the already present sources on many articles there (I grew tired of pointing out the ones that didn't even mention what they're supposed to support). Otherwise use a search engine, the beauty of the 2000's is that you no longer need to spend hours searching for information on crappy information bases and "search" engines. Asking people to do your research for you just tells me you're a lazy bastard.

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47616017)

For F's sake!!! This is /. Not References needed. Just Google it.
Go drink some Sake. :-)

Re:FreeBSD network stack (1)

Bengie (1121981) | about 3 months ago | (#47616147)

They're random blogs that I tend to come across when googling how to tweak network stacks for handling lots of connections. Take it as you will. It was an entirely anecdotal and opinionated blob of text that I probably just should have left out.

Re:FreeBSD network stack (1)

Bengie (1121981) | about 3 months ago | (#47616237)

Re-reading when I posted, this was meant for just the first sentence talking about the blogs. The rest of the information is "true", but based off of memory. The part about the threaded api code for FreeBSD 11 was from a youtube from BSDCON(or similar convention)(https://www.youtube.com/watch?v=7CvIztTz-RQ) that was just published a week or two ago. The zero copy part is about "netmap" I think. Another /. post in this thread also mentioned it.

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47616455)

I see you make a lot of comments with a lot of "facts" but you don't cite anything. Why don't you step up your game first?

Re:FreeBSD network stack (1)

dkman (863999) | about 3 months ago | (#47615713)

If I knew what made it superior I'd be sending a resume, not writing this post.

Re:FreeBSD network stack (-1, Troll)

Anonymous Coward | about 3 months ago | (#47615877)

Dunno. But while you neckbearded Linus and Theo bootlickers nitpick over a few Mb/s, I'll be looking down from my superior perch of Azure + Windows + .NET stack and chuckling.

Go ahead punk, mod me funny...make my day...

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47616457)

+1, Masochistic delusion

Re:FreeBSD network stack (0)

Anonymous Coward | about 3 months ago | (#47615899)

IPTables/netfilter sucks ass....

BSD firewalls alone make its networking better.

Long live PF && IPFW

That's simple (0)

Anonymous Coward | about 3 months ago | (#47615475)

Hire Linus

Well played, Zuckerberg, well played (0)

Anonymous Coward | about 3 months ago | (#47615479)

what a beautiful job of trolling Torvalds et al

Hire Me! I'll do it. (0)

Anonymous Coward | about 3 months ago | (#47615501)

Step 1: Use FreeBSD

Step 2: There is no step 2.

Why not create more Lennartware? (0)

Anonymous Coward | about 3 months ago | (#47615579)

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.

Re:Why not create more Lennartware? (0)

Anonymous Coward | about 3 months ago | (#47616077)

[hushed tone to everyone else on site] No one tell him about firewalld.

Why target second best, go for the best. (0)

Anonymous Coward | about 3 months ago | (#47615743)

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.

Corporate Contributions to OSS (5, Insightful)

phizi0n (1237812) | about 3 months ago | (#47615939)

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.

High perf SMP coding is in a category of its own (5, Informative)

m.dillon (147925) | about 3 months ago | (#47615991)

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

Switch to Solaris... seriously... (0)

Anonymous Coward | about 3 months ago | (#47616271)

Best TCP/IP stack on the market today (Solaris 11.2)

Holy shit (0)

Anonymous Coward | about 3 months ago | (#47616481)

Facebook actually did something I approve of?

I'm not sure I want to live in this world anymore.

Linux's stack is still 10000x better than windows' (0)

Anonymous Coward | about 3 months ago | (#47616573)

Windows is simply out of the league. Cheap toy for pleb.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?