FreeBSD has a reputation of being slow in combination with MySQL, especially when compared to Linux. However, some recent improvements in the scheduler shows that FreeBSD now is pretty much on par with Linux. It also shows that Linux scales very badly after a certain amount of threads per CPU.
FreeBSD on its best way to best release ever with ZFS/Dtrace/ULE 2.0/Xen and many others.
more here:
http://ivoras.sharanet.org/freebsd/freebsd7.html
Thats just the tip of the ice burg.
Linux 2.6 ABI emulation, Intel Hi-Def audio drivers (which Im using on my 6.2-STABLE laptop), Journaling UFS2, etc.
FreeBSD has always been slightly faster than Linux, even for Oracle that is run with the Linux Compatibility layer. I have never experienced slow MySQL server on FreeBSD. Nothing new. FreeBSD is about performance and beauty of code. Yeah! Go FreeBSD!
I have used both FreeBSD and Linux and I have NEVER experienced a significant performance difference. If there are performance difference between these Unices, you can measure them only with benchmarks which inherently tend to favor one of the measured systems depending on people responsible for the benchmarks.
If Microsoft measures the TCO of Windows and Linux, MS Windows will always win!
“The only statistics you can trust are those you falsified yourself.”
FreeBSD has always been slightly faster than Linux
Anyone who makes such a comment has no idea what they’re talking about. Performance isn’t something you can quantify with a number or even a graph. It’s a vastly multidimensional space. For one thing, SMP performance in FreeBSD has generally been horrible compared to Linux for several years.
They’re both excellent kernels with similar technical approaches. They differ mostly in code heritage and development model. Which performs better depends highly on too many factors to list.
FreeBSD has always been slightly faster than Linux
Correction. FreeBSD 5/6 has *always* been slower than Linux 2.6 in MySQL benchmarks.
The reasons for this range from FreeBSD’s gettimeofday being slow but very accurate while Linux’ is fast but not accurate; MySQL being coded for the Linux threading paradigm which doesn’t mesh well with FreeBSD 5/6’s M:N threading (switching to the 1:1 libthr library speeds things up a lot); to deficiencies in the older 4BSD scheduler on FreeBSD 5 (most of which are fixed in 4BSD on FreeBSD 6).
It’s only recently, with changes to the time counting functions in FreeBSD 6/7, the ULE 2.0 scheduler in 7, and the improvements to libthr in 6/7 that FreeBSD has caught up to/possibly surpassed Linux 2.6 in MySQL benchmarks.
FreeBSD 7.0 should be the release that makes it better than Linux 2.6. At least, here’s hoping that’s so.
The question is whether your system is running more than eight client threads. My web server does not. Therefore Linux is the right choice *for me*.
But if Linux “scales very badly after a certain amount of threads per CPU” why do thepiratebay.org uses a (modified) Linux kernel and not FreeBSD?
Linux was never developed with the intention to be “the OS of choice” just for a particular issue but it was developed to fulfill many needs (desktop capabilities, multimedia, server capabilities) at least satisfactorily. And *for me* it does!
If I should draw Linux I would draw something like this:
http://de.wikipedia.org/wiki/Bild:Wolpertinger.jpg
To be fair, Linux has stolen the OSS spotlight and so I think any news that a *BSD is still competitive (and in some areas even better) is fair play. I’m a Linux user, but I respect and appreciate the work the *BSD community has done, much of which is used in Linux.
But if Linux “scales very badly after a certain amount of threads per CPU” why do thepiratebay.org uses a (modified) Linux kernel and not FreeBSD?
I actually would expect linux to work well with *lots* of threads per-cpu, so it’s reasonable to expect Linux to work well with two fscking threads, but it doesn’t in that test. God knows what linux/mysql interaction or bug is going on here.
Edited 2007-02-23 01:25
As the guy said himself in TFA, somebody’s gunna claim that he’s doing something wrong to get such poor performance on Linux, and that person is me. Not because I refuse to believe the fact that FreeBSD performs better, but because I know for a fact that performance should never plummet like that at such low levels of CPU contention.
When you get such strange results for a benchmark, you have to figure out why before posting them and declaring a winner. Whatever is going on with his particular Linux kernel, it isn’t normal. He should retest with a vanilla kernel (instead of the FC6 kernel). I suspect the results will be quite different.
Also, he’s doing synthetic benchmarks on his development branch. It’s very possible that his scheduler isn’t working properly. I can write a scheduler that does great under contention. It would simply select a thread to run on each CPU and never schedule the others. That should give optimal transactions/second with this benchmark.
When you get such strange results for a benchmark, you have to figure out why before posting them and declaring a winner. Whatever is going on with his particular Linux kernel, it isn’t normal. He should retest with a vanilla kernel (instead of the FC6 kernel). I suspect the results will be quite different.
Nonetheless it’s still valid for pointing out a problem with a released OS. If it doesn’t happen with the vanilla kernel, then the redhat/FC guys should take a look. I would be more suspect if he did tweak some things or compiled his own with patches, etc. but having it plummet like that out-of-the-box is not good.
About the only nitpick then would be to emphasize that this is only known to happen with FC6 so far but I do agree that he should try other kernels.
If I should draw Linux I would draw something like this:
http://de.wikipedia.org/wiki/Bild:Wolpertinger.jpg
Your operating system sure looks funny! Someone posted this on ##freebsd freenode a little while ago:
http://img255.imageshack.us/img255/6585/pcmacbsdsq9.jpg
Edited 2007-02-23 14:40
But if Linux “scales very badly after a certain amount of threads per CPU” why do thepiratebay.org uses a (modified) Linux kernel and not FreeBSD?
The real question here is:
why have they modified the linux kernel if it scales perfectly ?
Yeah, you are right, Linux is an OS with no obvious goal and a shitload of glue
(No, I don’t think it’s that bad, but I prefer FreeBSD since I know everyone else runs the same thing instead of random collection of versions and apps, all Linux dists suck ;D, I’d prefer opensolaris with a better distribution than the Sun one thought.)
The ability to scale is of the utmost importance these days. This won’t just apply to MySQL – tip of the iceberg, indeed.
Go FBSD!
“freebsd bleeding edge in cvs 7” vs fedora core 6…
Maybe they should try the latest freebsd stable vs fedora core 6, or the same version of freebsd versus fedora rawhide running the 2.6.20 kernel.
Knowing that FreeBSD is catching up and in some ways better than Linux is nice to know, but comparing bleeding edge to not bleeding edge is a bit deceptive. Compare apples to apples, not apples to oranges.
Edit:
Also, FreeBSD does not enable MAC (Mandatory Access Control) by default. Fedora does enable MAC by default in the form of SELinux. Even though it is small, this is a performance impact. Disabling SELinux should show an increase.
Edited 2007-02-23 01:29
Dude, calm down. This pretty much looks like a linux/mysql bug somewhere, and bugs gets fixed. I doubt enabling mac is going to change anything (trying 2.6.20 may if 2.6.20 fixes something). Don’t bother asking for “fairness” for something just to avoid confirming that freebsd looks better in that graphic.
Is not that we don’t know that linux should do pretty well in such server benchmarks – it may or may not surpass freebsd but it certainly should not fall behind so bad. If the guy collaborates it’ll get fixed quickly and linux will look good past 8 cpus and life will go on. It’s stupid to waste time discussing this “mine is bigger” things when there’s no reason for doing it.
Edited 2007-02-23 01:41
wow, you totally misunderstood my post. I wasn’t saying anything emotionally. I was saying that comparing a bleeding edge cvs version of freebsd versus a not bleeding edge version of Linux (fedora core 6) is totally unfair.
In my books, that is.
Just out of curiosity, where exactly is this “bleeding” edge Linux kernel you are talking about? I thought Linus and company basically decided to make every release a bleeding edge release.
Just out of curiosity, where exactly is this “bleeding” edge Linux kernel you are talking about?
Good point, I was referring to the most recent kernel. Linux kernel 2.6.20 was released after Fedora Core 6 and is not installed via an update. The latest kernel in fedora core 6 is 2.6.19 and is shown right here:
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/i…
Then again, kernel 2.6.21-rc1 was released this Tuesday. A release candidate would certainly fall under “bleeding edge”:
http://lkml.org/lkml/2007/2/20/462
It’s some kind of crap, if you don’t really know what’s “bleeding edge” in Linux and “bleeding edge” in FBSD – very different. FBSD works with quality in mind and so “bleeding edge” is maybe the some word but it isn’t the same meaning.
you are talking bullshit.
There is no difference in “bleeding edge” in FreeBSD and Linux. Bleeding edge is for both systems, a term for something completely new and possibly unstable.
Linux works with quality in mind as well, so your whole statement is void.
Linux works with quality in mind as well
Yes, I know that statement is offensive
“you are talking bullshit. ”
I think that is the qualifier for being modded down. That pretty much qualifies it for personal attack/offensive language.
No it doesn’t. It’s not an offensive term. It is offensive to claim it is offensive.
It’s indeed comparing apples to oranges. Because Linux Kernel is *always* bleeding edge and comparing “bleeding edge” in FBSD is like the so-called stable kernel in Linux. So of course you can compare FBSD 7 to Linux “stable”. Two different development models and so different naming-schemes too.
Linux is not always bleeding edge. It is so incorrect, I don’t have words for it.
FBSD 7 is not comparable to all version of the Linux kernel. FBSD is unstable and should be compared with a possible unstable Linux, rather than comparing completely new with something quite old.
FBSD is far away from stable. The FreeBSD devs say so.
First of all, FreeBSD development model is very different from Linux. While in Linux, it is okay to switch in new schedulers, new threading models, new vm, etc., this is not done in FreeBSD. Once FreeBSD goes stable, very little changes are really done to it in terms of integrating newer technology and most of the work is just fixing, modifying what is in it. While you might not consider it fair to compare FreeBSD current to a release version of Linux, you have to keep in mind that the 2.6 Linux kernel releases are basically equivalent to FreeBSD current except for the fact that they are fully tested and debugged so that they will be very stable. Unlike FreeBSD, Linux has tons of testers and hackers that constantly hacking away at new kernels to make sure that they are pretty stable. But truth be told, there is no 2.7 kernel where all the new innovative work is being done, where everything is going to suddenly change.
Secondly, this is not a pissing contest. It does not really matter if the Linux kernel 2.6.19, 2.6.20, 2.6.21 or whatever are being tested. It does not even matter that Linux fell downwards past 1 thread per cpu. The significance of this story is that FreeBSD SMP work is coming along very well and is now pretty much on par with Linux in regards to SMP. The fact that FreeBSD was able to scale well to multiple CPUs and to scale comparably to Linux in itself is remarkable. Maybe some Linux hacker can easily fix whatever is wrong with Linux, but who cares. Considering FreeBSD 7 will be released towards the end of this year, this puts FreeBSD now only one year behind Linux in terms of scalability on 99% of machines out there. And considering there is a physical limit on scalability, it is very unlikely that Linux will ever hold that wide of a lead against FreeBSD in this department again.
In conclusion, the story is FreeBSD current scales, get used to it.
While you might not consider it fair to compare FreeBSD current to a release version of Linux,
Now, that would be a fair comparison. The problem is that the comparison is _not_ a comparison between FreeBSD current and a release version of Linux
The fact that FreeBSD was able to scale well to multiple CPUs and to scale comparably to Linux in itself is remarkable.
No it’s not. We all know FreeBSD is good, and in certain areas has been ahead of the Linux kernel for quite a while. I’m not against FreeBSD – au contraire. I just don’t think much of Oliver’s post, because it was basically a troll-post.
It isn’t the same semantics, so forget about your nonsense saying. FBSD7 is indeed unstable according to the quality standards of FreeBSD developers, according to these standards *every* Linux kernel is unstable and wouldn’t make it for release!
Furthermore you can’t blame the author of the comparison for the misleading topic at OSNews! It’s *maybe* a necessity for OSNews to fulfill the goal in terms of readers, because all the Linux zealots without any real *BSD knowledge will start their war because of FUD.
Linux is about “hate”, about “hate” against anything they do not like and they do not understand at all. Linux-community defines itself through flamesware, bashing, OS-wars, distro-wars, hacks, instability, “horny on features” but not able to fix bugs. Ask Mr. Andrew Morton about the lack of quality in Linux kernel and the refusal of most of the developers to fix bugs instead playing around with new toys.
Btw. Debian is the one and only real quality Linux distro. A high quality package management, KISS, very good configs and developers with quality and stability in mind.
http://news.zdnet.co.uk/software/0,1000000121,39267255,00.htm
http://lwn.net/Articles/183053/
>FBSD is far away from stable. The FreeBSD devs say so.
son: “Ma – Linus says Linux is the best os around the world” … mother: “yes my dear, take a cookie and be quiet” :o)
And don’t forget, most of *BSD users don’t even read this mumbo jumbo, because they do know their operating system, they do know the quality. “Morons” like myself are answering such trollish postings, because most of them are former Linux advocates who do know the bad behavior in this so-called community.
Linuxism is a no-brainer in *BSD-world, it’s a no go for every real Unix or Unix-derivative.
Maybe we would talk about it with good manners in some pub – but at this platform I don’t see any fact apart from FUD of Linux-users. Sorry.
Edited 2007-02-23 18:03
“It isn’t the same semantics, so forget about your nonsense saying. FBSD7 is indeed unstable according to the quality standards of FreeBSD developers, according to these standards *every* Linux kernel is unstable and wouldn’t make it for release!”
FreeBSD does come in three branches: -RELEASE, -STABLE and -CURRENT. While it maybe okay to call -CURRENT “bleeding edge” (because it includes experimental code in the state of the actual development progress), it’s not okay for -RELEASE because of it’s high quality standards.
I won’t say Linux is not about quality because that’s not true. But I may say this: If I read the system sources and are unsure about what a certain function, kernel interface or system component (e. g. a configuration file) does, I just “man (its name)” and have the answer. Using Linux, I had some problems understanding some kernel passages because there was no documentation available. Sometimes, there was a comment in the source file which could be used to do some google search, but that was everything… But I admit I’m not up to date here, so maybe the situation within Linux has improved already.
So development is not only about realizing features using code, it’s about documenting and testing it as well.
“Furthermore you can’t blame the author of the comparison for the misleading topic at OSNews! It’s *maybe* a necessity for OSNews to fulfill the goal in terms of readers, because all the Linux zealots without any real *BSD knowledge will start their war because of FUD.”
I’m not sure I may say this, but it reminds me to a typical situation here at OSNews where “Windows” and Linux advocates start attacking each other. “Mine is bigger!” and “You’re stupid”, combined with FUG is uneducated rubbish and should not be on this platform where at least a certain moral, intellectual and professional development of the people discussing topics here can be assumed.
“Linux is about “hate”, about “hate” against anything they do not like and they do not understand at all.”
Sorry, I have a different opinion here, but I can understand yours because there are some evidences for it in fact. But I would not generalize.
“Linux-community defines itself through flamesware, bashing, OS-wars, distro-wars, hacks, instability, “horny on features” but not able to fix bugs.”
Are the deveopers “horny on features” or is this for the users? Or both of them?
New features are okay, but they may not be more important than a functioning base system which a developer and a user must be able to rely on.
“Ask Mr. Andrew Morton about the lack of quality in Linux kernel and the refusal of most of the developers to fix bugs instead playing around with new toys.”
What toys are these? 🙂
“Btw. Debian is the one and only real quality Linux distro. A high quality package management, KISS, very good configs and developers with quality and stability in mind.”
Maybe this is the reason why other distrubutions are more polular. Linux defines it market share (how I love this term!) through it’s users. If the users are not interested in high quality, they will use something else, then start complaining and right afterwards switching back to “the good ‘Windows'”, where “everything works by itself”.
“And don’t forget, most of *BSD users don’t even read this mumbo jumbo, because they do know their operating system, they do know the quality.”
Indeed, they do.
“”Morons” like myself are answering such trollish postings, because most of them are former Linux advocates who do know the bad behavior in this so-called community.”
Sad to say, but the worst individuals out of a community seem to be the common representors if this community – as stereotypes.
Your post has proven you’re not a moron. It seems you just got in contact with these bad examples too much.
I can only talk about me being a user of commercial UNIX systems. I’m using FreeBSD at home, mostly Solaris at work. Linux has made a great step promoting UNIX like operating systems to the public. As I read (don’t remember where and when), Linux does have the best hardware support (supports most hardware) around. There are friendly and helpful discussion boards, forums and IRC channels about Linux which explicitely aim at Linux beginners. In the “FreeBSD world” (don’t bash me for this term, I just invented it), we first read, then ask. Maybe it’s different in the “Linux world”?
Linux and BSD can benetif from each other. Both have the right to exist, and it’s fine they’re existing.
Let me add a thing: If we’re talking about Linux, we’re usually refering to the Kernel, as we do if we’re talking about the FreeBSD kernel. While the Linux kernel comes with several different distributions (Debian, Gentoo, SuSE, Red Hat, Fedora etc.), FreeBSD does only come in *one* distribution which contains just the base system, nothing more. If we’re talking about distributions, we’re talking about preconfiguration, preinstallation and testing done for both the OS and the additional applications. Such distributions using the FreeBSD OS are PC-BSD or DesktopBSD, for example. For Linux and BSD distributions: They serve different purposes and user groups. While distribution A is ideal for gaming, distribution B is bad at gaming, but fine on a server.
Final statement: Use the right tool for each work.
Edited 2007-02-23 19:20
The semantics are completely identical.
The comparison is between unstable FreeBSD and stable Linux. You don’t grok the Linux versioning scheme since you claim all of them are unstable versions. That is incorrect. Every release has unstable and stable versions.
Linux is not about hate. Linux does not define it self through flame wars more than BSD-world does. Just take a look at the flame wars between certain PC-BSD fans and DesktopBSD fans. Or NetBSD vs. OpenBSD devs. It is not a Linux-thing.
Debian is good, but gentoo also has high quality documentation. At FreeBSD level btw. And yes, I like FreeBSD. I even use in the shape of DesktopBSD. Still waiting for 1.6 though, but I could get it through FBSD-ports. I’ll have to anyway, since I don’t have a DVD-burner.
Oliver, it was you who posted a troll-post. And not me. I merely corrected your false statements. As a FreeBSD-user I’m ashamed of you
The title says “breakthrough”, however there’s not a reference from previous freebsd versions. How much it’s really improving compared to itself?
The Linux behaviour reflected in the graphic looks more like a linux/mysql bug than real performance numbers. Sorry, but being faster than linux because of a bug or god-knows-why doesn’t make it a “breakthrough”. A big improvement compared with previous freebsd versions would, however.
Edited 2007-02-23 01:32
There is a image linked by the article which shows a whole bunch of BSD versions (+options) which shows the improvement. Assuming of course you recognise which version is which.
it can currently be found here:
http://obsecurity.dyndns.org/holycrap.png
since performance is all about what we believe to be true.
They must have mixed up the numbers on that benchmark… because Linux is and always has been flawless.
I think almost everyone has missed the point and taken FreeBSD’s improvement as an attack on Linux. To me all it shows is that good progress has been made in the up coming FreeBSD 7.0 release. I failed to find anywhere he belittled Linux in anyway clearly stating that FreeBSD is only catching up.
I am glad to see FreeBSD catching up in this area. I have been tempted a few times to move my database server to running Linux due to its superior speed with MySQL but now it seems I can simply wait and then upgrade.
It certainly will be interesting to see benchmarks when FreeBSD 7.0 is finally released. It will give more readers reason to feel like their manhood has been measured and found lacking.
over and out…
please notice the comment Dave Jones made.
If fedora was not up2date this could harm performance.
fedora core 6 vs freebsd bleeding edge in cvs 7.0
lulz. FC6 is a desktop distro, uses desktop kernel. Please repeate the test with server-tuned kernel.
Just out of curiosity I run this same test on my desktop machine (Pentium 4 2.6 Ghz 512MB RAM). Using Arch Linux with stock kernel (2.6.20.1) and stock MySQL (5.0.27).
Number of threads -> Transactions/sec
1 -> 271
2 -> 304
4 -> 296
8 -> 294
16 -> 271
Notice that this is a single core box, not a 8-core one as in the original test. So in the original test, transactions drop as soon as there is more than 1 thread per core (more than 8 threads total), while I tested up to 16 threads per core without any performance hit.
So either Linux’ problem is just with multi-core/multi-thread combination (but not with multi-thread or multi-core alone) or the original test had some kernel problem.
I like FreeBSD,
and I would tend to say it’s a bit faster. I testet Linux and FreeBSD on my old Pentium II, and I think linux is a bit “heavier”.
But I like both very much.
I testet Linux and FreeBSD on my old Pentium II, and I think linux is a bit “heavier”.
Indeed. I feel it the same way, though my Linux system is using Gnome and my DesktopBSD system is using KDE, so I cannot say for sure.
But I like both very much.
Agreed.
I testet Linux and FreeBSD on my old Pentium II, and I think linux is a bit “heavier”.
I think that has less to do with the kernel and more to do with the default services each system starts up in the background.
No doubt about that. My DesktopBSD system is configured quite differently than my gentoo Linux system. And using different DE’s as well. Notthat I have an awful many services running, since nothing runs unless I decide so – unlike binary distributions.
I would love to see BSD garner the same support that Linux has. I like Linux (when the community surrounding it is cutting throats), but my understanding, which is limited, is that BSD is a better overall platform in which to build an OS on.
However, I’m sure that if all things were equal Linux would win some areas and BSD would win in other. I hope they both have a good long life.
People
Let’s not lose perspective here. Jeff’s blog entry was showing that his changes had improved FreeBSD a lot, and by the way, it appears to perform better than Linux for some cases, and was on par for others. Prior to his changes, Linux blew the doors off FreeBSD for this benchmark for all but the most trivial cases.
He also never claimed it was a ‘marketing’ benchmark. Nor did he claim to know enough to make it optimized for Linux. He’s totally willing to rerun his tests if people provide him with a more optimal configuration for Linux. This benchmark shows that one change that he’s making to the kernel raises things substantially. That’s the only conclusion that can be drawn from these graphs.
Also, Linux isn’t always better because it is Linux. That’s true for any value of Linux in the previous statement, but it FreeBSD, Windows or just about anything else. Reacting in anger and ignorance about the statement that your beloved Foo might not be better than the hated Bar is just noise, and should be ignored. This forum is supposed to be a technical forum. If there are problems with the testing, be specific as to what they are. I’m sure that Jeff would re-run the tests with better tuning if he’s provided with better defaults. He’s as much as said so in later entries in his blog.
So please, get some perspective. This isn’t an attack or anything so venal. It is just one developer who found a cool way to eliminate a bottleneck in FreeBSD. He was pleased that this made the shape of the graphs better, and also, btw, compared favorably with the Linux distrubition that he happened to have laying around. War was not declared.
Peace
Warner Losh
FreeBSD core team speaking as an individual
This ain’t Apples vs Oranges. People are getting really worked up over what amounts to Red Delicious vs Golden Delicious.
The taste preference tells you less about the apples and more about the eater.
People , could we stop this “mine is biger” , please ?
It started with “FreeBSD is catching up Linux” and now we’re talking about “Linux is about hate”…
Please check out this two pages :
http://jeffr-tech.livejournal.com/6011.html
and
http://jeffr-tech.livejournal.com/6268.html
This test is waste of time, because BSD is about to die. It’s true, I read that on the internet.
– And i cannot belive that a osnews thread about any bsd has come to post 40+, without anyone to mention that.