What's New in the FreeBSD Network Stack
jjgm writes "As FreeBSD 5-STABLE approaches, Andre Oppermann has produced a high-level presentation on the changes to the FreeBSD 5.3 network stack. There are many clever tricks for performance and scalability. Amongst other things, Andre claims that FreeBSD can now route 1Mpps on a 2.8GHz Xeon whilst Linux can't do much more than 100kpps."
NDIS Binary Compatibility
/* Compile and install new kernel with "options NDIS" */
FreeBSD i386 can use binary Ethernet and WLAN network drivers written to the
Windows XP NDIS 5.1 specification. It is a little cumbersome to convert a NDIS driver
into a FreeBSD Kernel Loadable Module (KLD): (By: wpaul)
# ndiscvt -O -i neti557x.inf -s neti557x.sys -n intel0
#
# kldload intel0
Man ndis(4), ndisapi(9), ndiscvt(
All this talk of Mpps and Kpps is making my need to pee more urgent.
Can someone explain what the 'pps' means? the M and K dont need defining...
Nice throughput- so how long before MS implements it in Longhorn or XP ? :D
Actually, pps (packets per second) is a quite common if not misleading statistic spewed by networking equipment vendors, and has been for years. Packets-per-second doesn't really tell you the characteristics of the packets being sent. One interpretation might be the following:
The minimum ICMP packet size with Ethernet II encapsulation is 46 bytes. The minimum TCP packet size with Ethernet II encapsulation is 54 bytes. So, 1000000pps of 46 byte ICMP is 368 megabits/sec. And, 1000000pps of 54 byte TCP is 432 megabits/sec. Both of these figures seem realistic to me.
Now, the maximum length of an Ethernet II packet, regardless of any upper layer protocols is 1514 bytes. 1000000pps of 1514 bytes is 12.1 gigabits/sec. Obviously, that packet size isn't what they were referencing.
In respect to the link speed, a 1000Mbit or a Gigabit Ethernet link is quite common these days and the above minimum packet size stats aren't out of line.
Actually, on both OS's with a larger packet size, and thus a lower amount of packets-per-second, a decent machine with 66mhz PCI Gigabit NICs can easily route 500mb/sec through the box.
Packets-per-second doesn't really tell you the characteristics of the packets being sent.
No it doesn't, however, being capable of sustaining 1 million packets per second, even if they are the smallest packets possible, is pretty impressive.
The packets have to each be serviced, so at around the same line bandwidth, smallest packets could be coming around 30 times more frequently than the largest packets.
Lots of small packets tend to be more taxing than much fewer large packets.
The fact that there is perhaps a 10 fold difference in performance ceiling between Linux and FreeBSD, should show that this is not a simple bandwidth limit. I would go so far as to say that bits per second can be more misleading than packets per second if used alone or in an inappropriate context.
Packets per second says a lot about the stack, bits per second says more about the interface driver.
War crimes, torture, lies, illegal spying... Would someone give Bush a blowjob, already, so he can be impeached?
They don't need to. Linux uses *very* dumb routing algorithms at the moment. There is a fair amount of public research on much smarter mechanisms (one of which I guess FreeBSD would have used). AFAIK, this is getting implemented on Linux as we speak.
Packets per second says alot about the NIC as well. Use one of those cheap (cheap, like in bad quality) Realtek cards, and do a "ping -f" while watching top. See the CPU usage increase alot. Now, try some better cards, and you don't see the same.
This is just another proof on the superiority of the freebsd tcp-stack. I can't wait for a full benchmark between 5.3 (or 5.4, too much changes on 5.3 might not work just wounderfully right now) and the linux kernel.
The more interesting thing for me is: Will these enhancements make it to Mac OS X?
As far as I am concerned, the closer Mac OS X under the hood, makes itself closer to FreeBSD the better.
When I worked at Chiaro, we routinely handled saturated optical GbE links as part of testing. Of course, these didn't handle bulk data traffic, just the routing protocol updates :-> for the control processor(s) for the real router, which was all optical. I forget how many hundred OC-192 (10 Gb/s) ports it could handle.
My job there involved, among writing and backporting GbE drivers for Intel NICs under FreeBSD, stress testing their STAR mechanism: this was designed to ensure if one router control processor went down, there would be no loss of functionality -- the secondary router control processor was on hot standby and knew all about the routing table state of the first one.
You could've hired me.
your ignorance is great, pf is already ported to FreeBSD for quite some time as a kernel loadable module, and it will be integrated with 5.3-RELEASE. Have you copy-pasted a FreeBSD flaming text a year old ?
Please.
Linux uses *very* dumb routing algorithms at the moment. There is a fair amount of public research on much smarter mechanisms (one of which I guess FreeBSD would have used).
Thanks.
Listen - do you know of any good texts or treatises that describe these [new] mechanisms?
When even my laptop has 1Gbit networking built-in, I'm not sure how you can say "faster than 100Mbit exists, but it sure isn't common".
And Mpps is a standard notation for packet forwarding....FYI.
-psy
Of course the trolls just copy/paste/edit, and it's a sign of their inferior and feeble mind. Not that they have any mind at all; it's just mindless copy/paste/edit, when they manage not to bungle the "edit" too much.
Most of them don't even do a copy/paste/edit : they download a script that does all the work for them. Quite frankly, I'm not sure that they are capable to do a copy/paste/edit. This is why you never see any spark of intelligence or originality in their posting; it's the same post over and over and over and over and over again.
Reading through the presentation I realised I'll be reinstalling my FreeBSD firewall again after 5 becomes officially STABLE, heh.
Yes, I always do a fresh install and not an upgrade.
home
Hmm. My server has 3 RT8139's in it.
:)
Perhaps the Linux driver handles it better.. (this is a 486sx/33 that is hammered by doing routing for anywhere from 3 to 10 other computers, email services for a whole metric arseload of accounts that receive a ton of spam a day..) still pulls out around 80-95Mbps on transfers within the network, and gets me up to the max 3Mbps incoming speed for Internet usage.
I'm happy with my RT8139's
"Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
Wow, those packets are damn cold. Yes, they are.
"Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
common? in the mac community, powermacs (and some powerbooks) have had gigabit ethernet as standard and the rise of feature rich mobos (quick - here's SATA raid, 2 channels of ATA raid, a dancing lemur, and gigabit ethernet) are making it steadily more common.
Don't worry - its just stigmata. Pass me a napkin and don't you dare tell my mother.
I read some comments on "it is likely you'll be able to through Mpps at it?"
YES, it's happened to us, here on our university boxen, somebody got r00ted, and _crackers_ got in through some backdoors on a LOT of machines, then started DoS'ing my department, we have a small P-II 5.2.1 box tossing packets like nobody's business.
When the college network runs mostly Gigabit, Mpps is a plausible measure of connectivity.
Error 407 - No creative sig found
Uh. This is not a Troll. This is anti-troll, via being facetious.
assert(mod == stupid);
You've got it. Unlike what is perceived from Linux (all software must be free), BSD is about making all software better. That's the benefit of the BSD license that many people (usually GPL fans) don't understand.
The best way to predict the future is to invent it
you have a 33 MHz box that pulls 90Mbps of traffic ? I'm impressed ....
I dunno; the only reference I can find comparing them is this, where the FreeBSD driver is said to be using a faster technique. What's your system load when network's saturated?
;)
My machines all have NetGear FA311's, which seem to hasis0: Applying short cable fix (reg=5)ve a few of their own problems, but at least they don't have pages of pained commentary in their drivers on how awful the developers think the hardware is
The networking functionality of Mac OS X is in fact derived from BSD, FreeBSD in particular. There is actually a fair bit of FreeBSD kernel stuff in the Mac OS X kernel, and you can see this in the Darwin source code:
http://gobsd.com/code/darwin/
http://gobsd.com/code/darwin/xnu/bsd/
http://gobsd.com/code/darwin/xnu/bsd/net/
Sadly it seems that people here are very ignorant about the connection between FreeBSD, and Mac OS X, especially where the Mac OS X kernel is concerned. There are a few people here that are claiming that there is not FreeBSD code in the Darwin kernel, only in the Mac OS X command line apps, and this is blatantly untrue.
In order to better see just how much FreeBSD code there is in the Darwin/Mac OS X kernel, and how relevant this work in FreeBSD will be to Mac OS X, please read the following links:
http://www.kernelthread.com/mac/osx/
http://gobsd.com/code/darwin/xnu/
http://www.apple.com/ca/macosx/features/darwin/
http://developer.apple.com/darwin/
Seriously, with so much documentation available, it's unacceptable for supposedly technical people involved with BSD to not know just how important BSD code is to the kernel of a very nice, and hardly secret or obscure operating system like Mac OS X.
While I am mostly in agreement with you about Linux being crap compared to OpenBSD security wise, your statement regarding nothing beating OpenBSD as a firewall is pure bunk.
i d=466&lang=en
The Sidewinder G2 firewall implemented on top of "Secure OS" (a BSDi derived OS developed by the people who co developed the technology used by the NSA's "Security Enhanced Linux" has not yet been compromised, and has recently achieved full EAL4+Common Criteria (CC) certification. It is unlikely that OpenBSD will ever do that.
Had I the money, I would use nothing else myself, as Secure OS is *Hard Core* Military grade security built into a BSD OS.
http://www.securecomputing.com/news_display.cfm?n
Read. Learn. Grow.
Please refrain from personal attacks.
I realized that my wording was off as soon as I hit Submit, but I decided not to post a reply to it as most intelligent people would be able to figure out what I meant.
The BSD license _never_ required "attribution" except to the original copyright holders. There is no requirement beyond that, and never has been. For some reason I thought there had been, and I forgot to change the paragraph text after reading the license and realizing my mistake. I'm sure you've made editing mistakes as well.
As far as being a troll, I most certainly am not. A troll spouts off at the mouth trying to get emotional responses. A troll does not lay out organized lists of specific opinions and a troll does not then back up those opinions with sources. Please see http://en.wikipedia.org/wiki/Internet_troll, specifically "Many posts may inadvertently cause strife as collateral damage, but they are not trolls."
Certain Slashdot moderators would do well to read this as well.
It's not a question of actually doing 1 million packets per second, it's the efficiency that gives it the POTENTIAL to do 1 million packets per second that's important. This gives everything else that much more time to do what they need so the same hardware can do MORE work.
I said it is not required *except* to the original copyright holders. If I make change X to program Y, and submit that change back to the owners of program Y, they are not required by the license under which they put program Y to give attribution in the source or documentation of program Y to me for change X. They are not required to do so. Period. You see, the thing with the BSD license is that it isn't "viral" like the GPL. It applies to the original and not to derivative works. If I want attribution like that I have to separately license my changes back to the original authors, which, depending on the size of my modifications, could be either wise or very petty. Kind of like you're being. Petty, I mean.
Oh, you were wondering where you could read the source? Well, DragonFly's cvsweb has a nice interface for it. You can also compare codebases at lxr.watson.org.
Also, DFBSD has diverged from FreeBSD 4 a great deal already. The userland might be mostly the same, but kernelwise it's all different. The developers put a lot of time and effort in it. The fact that you don't see the difference means that they are doing their work correctly. So to say that it is *entirely* based off of it is completely false. It also has bits from NetBSD and OpenBSD.
For the record, I don't give a hoot if they take code from DragonFly. The guys working on DF should be credited for their work, that's all.
Comment removed based on user account deletion
Because FreeBSD has a grown-up license [i.e. a license written by grown-ups, as opposed to a license written by Peter Pan Syndrome utopian-fantasist fifty-year-old teenagers],
Wow.
Whos' bitter now?
It might not be required but it is at the very least part of proper social interaction. You don't just "steal" bits from somewhere else and include it in your own *BSD project.
Now concerning the case of the DragonFly network stack, Hsu's chooses to use a time-limited advertisement clause for his code. That's his very own right to do. IIRC the reason was exactly the goingons with certain FreeBSD commiters not willing to correctly attribute his and others changes.
Face it: DFBSD has not got anything to propose to FreeBSD save Dillon's marketing speeches on various mailing lists and its influence on FreeBSD was abysmal. Hsu's license is _incompatible_ with FreeBSDs goals and thus his code has not been taken verbatim.Of course, some ideas have been borrowed and improved upon. This is no different from the constant stream of improvements DFBSD folks appropriate from FreeBSD5, often with no attribution at all. Frankly, I hardly see any useful stuff in Hsu's code worth facing his assholic personality. If anything, it is DFBSD folks who should be jealous. Hsu has left FreeBSD and _nothing_ has happened. Project continued just fine, in fact, making more progress every day now that this particular obstacle has kindly removed itself.
You've got PCI slots in that 486SX/33 ? That is not that common.
Yes, Opterons are sweeter when it comes to routing. Here's excerpt from commentary on Linux netdev:
We can certainly do better than that on Opterons. Robert
reports a 1.3 Mpps rate on a dual opteron 1.6Ghz. Our numbers on Xeons
are less than 1Mpps.
:wq
But is still is impressive on a 2.8 Xeon, which is what the blurb stated.
Don't blame me, I didn't vote for either of them!
/*
s rc /sys/sys/socketops.h?rev=1.5&content-type=text/x-c vsweb-markupi ts+hsu&btnG=Go ogle+Search&domains=leaf.dragonflybsd.org&sitesear ch=leaf.dragonflybsd.orgd .org/mailarchive/kernel/20 04-07/msg00121.html
* Copyright (c) 2003, 2004 Jeffrey M. Hsu. All rights reserved.
*
* License terms: all terms for the DragonFly license above plus the following:
*
* 4. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*
* This product includes software developed by Jeffrey M. Hsu
* for the DragonFly Project.
*
* This requirement may be waived with permission from Jeffrey Hsu.
* This requirement will sunset and may be removed on July 8 2005,
* after which the standard DragonFly license (as shown above) will
* apply.
*/
http://www.dragonflybsd.org/cgi-bin/cvsweb.cgi/
http://www.google.com/search?q=comm
http://leaf.dragonflybs
This took a total of 2 minutes to find.
Why not use google next time before looking like a flaming linux jackass?
Please point out an example where DFBSD doesn't attribute correctly. I think you won't find any. (and if you do, please mail the kernel-list, since the dfbsd crew is very strict about that)
That being said, wow, that's a truly awful design.
--Dan
Seen in Slide 21 in the PDF file....
TCP connections in TIME_WAIT2 state (connection closed) waiting for the 2MSL timeout maintain only a minimal set of necessary information instead of a full blown TCP control block. This saves about 80% memory per connection in that state. Especially for HTTP servers this give a far better kernel memory resource usage and a higher number of concurrent connections that can be served within a short time frame ("Slashdot effect").
Brian: Friends, we must unite to fight the common enemy!
Everyone: The People's Front of Judea!? Where!
For god's sake, they're both Unix-like operating systems. There's not a huge difference between them for most purposes, I don't think anyone who's not a complete fanbot would say either is objectively better than the other for all purposes.
What'd really be funny is if MS replaced their own NDIS guts with the BSD implementation, since (*big assumption*) MS created NDIS for themselves.
I can read that many ways.. yeah, also as a troll, but 'funny' was really the first thing that came to mind, not troll.. and it is factual.
I'd really appreciate it if my fellow BSD users would get a bit more of a sense of humor etc...
Which is too bad. the similar clause in the BSD license was removed for good reasons, and without wanting to give any judgement as to the quality of Hsu's work, he obviously did not get the clue there.
Anyway, I was wondering about the rules on this playground: How would you pull a stunt like that without losing face?
Contrary to the impression left by all the Linux/BSD/GNU etc. zealots, releasing the code under a BSD or GPL license means there is no real OS war going on between say Linux (with or without GNU) and *BSD. The BSD license for the network stack pretty much says "here's our code - feel free to use it, find mistakes, improve on it, etc." If other operating systems (open or not) decide to ad[ao]pt it, this would be a recognition of its quality. There's no losing face in paying a compliment to someone for good code. Of course, if one has a better idea/technology/etc. for doing the same job, one does one's own implementation.
However, childish types will only see a 'my OS is bigger than your OS' face for this.
Filesharing at 1000Mbps > filesharing at 100Mbps.
Not that I'd know, not having a GigE switch, or indeed any other GigE devices, but since it comes bundled on most new motherboards I can at least look forward to my HD's no longer outpacing my LAN many times over next time I upgrade my server.
I'd really appreciate it if my fellow BSD users would get a bit more of a sense of humor etc...
Me too. I am responsible for the first post. I meant it as a jab to the trolls who keep posting the BSD is dead crap. They just keep on posting, while FreeBSD, OpenBSD, NetBSD and Mac OSX just keep taking huge strides forward.
I posted as AC because I did not want to submit my login details from where I was at the time.
War crimes, torture, lies, illegal spying... Would someone give Bush a blowjob, already, so he can be impeached?
No Open Source license allows relicensing. What you can do, however, is to redistribute BSD licensed code under the GPL. You can also license your own derivative works under the GPL.
Not everybody always uses the most precise language in informal contexts such as Slashdot. In colloquial discussion of free software, to "relicense" a work means to distribute a derivative work under a different license, often from permissive to GPL or the like.