According to Linus, Linux Is "Bloated"
mjasay writes "Linus Torvalds, founder of the Linux kernel, made a somewhat surprising comment at LinuxCon in Portland, Ore., on Monday: 'Linux is bloated.' While the open-source community has long pointed the finger at Microsoft's Windows as bloated, it appears that with success has come added heft, heft that makes Linux 'huge and scary now,' according to Torvalds." TuxRadar provides a small capsule of his remarks as well, as does The Register.
"Okay, so the summary of this is that you expect that 12 per cent to be back to where it should be next year, and you expect someone else to come up with a plan to do it," joked Bottomley. "That's open source."
That is also the problem. Everyone adds pieces and eventually it starts to become a mess. Then someone else should fix it.
is finally having the last laugh? /dnrtfa
Of course nobody refers to Windows' kernel when people call it bloatware. Linus however is not talking about Linux as a distro or an operating system, it's just the kernel that's too bloated in his view. And with over 11 million lines of code, it's hardly even a flame.
Now if only he had developed a microkernel instead...
Pretty good is actually pretty bad.
However, Minix continues to maintain its girlish figure.
Uh, I'd love to say we have a plan. I mean, sometimes it's a bit sad that we are definitely not the streamlined, small, hyper-efficient kernel that I envisioned 15 years ago...The kernel is huge and bloated, and our icache footprint is scary. I mean, there is no question about that. And whenever we add a new feature, it only gets worse.
And also:
He maintains, however, that stability is not a problem. "I think we've been pretty stable," he said. "We are finding the bugs as fast as we're adding them -- even though we're adding more code." Bottomley took this to mean that Torvalds views that the current level of integration acceptable under those terms. But Mr. Linux corrected him. "No. I'm not saying that," Torvalds answered. "Acceptable and avoidable are two different things. It's unacceptable but it's also probably unavoidable."
I think that's very important to note. His quote by itself is very self-loathing but to add that tit's unavoidable really says a lot. You want to be popular? You have to satisfy more people and in doing so you become more bloated. He does maintain that Linux remains stable and that's usually the biggest problem I have with bloat. It decreases stability. I don't think there's any reason to get excited about level headed rational and reflection.
My work here is dung.
What "bloat" in software means to LT as the high priest of the kernel and what bloat means to me as a user are two different things.
To a user, bloat means awkward, slow, inefficient, and needlessly large (if my storage space or bandwidth is limited). But these are all *perceived*. I don't perceive Linux to be bloated.
In fact, I find *NIX with almost any window manager to be the most efficient computer OS I have ever used. Linux is the best of them, despite being a clone of the UNIX userland.
If an OS can boot from a floppy or small USB key and be totally usable, it is certainly not bloatware. Rewrite the Linux userland in MONO or Java and then we'll talk about bloat.
Rich And Stupid is not so bad as Working For Rich And Stupid.
"Now if only he had developed a microkernel instead..."
It would be bloated AND slow.
But hey, it would look pretty in a high level UML diagram.
About two years ago I tested wether my Gentoo kernel was really faster. Disabling 3/4 of the options really just improved boot time and memory footprint, but not overall performance that much, at least far from 12%. Compared to a modularized kernel with just the stuff loaded, that was needed, the difference was negligible. I'm not sure if Torvalds is telling the truth about the reasons. To me it seems that the central, overall kernel architecture has degraded over time with regard to performance.
Torvalds' use of the term "Bloated" in this case refers specifically to a loss of performance and an increase in size and memory usage, not of confusion.
I think there are two (competing) goals for the Linux kernel as a whole (well, there are as many goals as there are developers, of course, so the two competing goals are more of a continuum).
On one side, there is a desire for the Linux kernel to support more features so distros can be built to be more like popular mainstream operating systems like Windows and Mac. Ease-of-use, a pleasant user experience, separation/insulation from the dreaded Command Line, pretty graphics, massive hardware support, and support for more "oddball" configurations like multiple screens, etc. So it's desirable to have lots of driver support and lots of hooks into the operating system to support fancy stuff.
On the other, there is a desire for Linux to be small, sleek, and fast, particularly for embedded projects.
The former has been running the show for a while, and I think that's healthy and positive, but the kernel has gotten larger and slower at its basic job. For desktop users, this is good news since a lot of things that had to be done at "higher" levels can now be accomplished directly in the kernel, so they might actually have a faster user experience, and they've got resources to burn since most PCs are specced out for Windows, so Linux has a lot of spare growing room in that hardware.
But for embedded/minimalist supporters, it means they need to add more hardware to their machines to support the now-larger kernel, chock full of features they'll never need or want.
"This post contains words, known to the State of California to cause thought. Wash brain thoroughly after reading."
(1) Large feature set
(2) Compact/optimized
(3) Fast to market
Pick any two...
I come here for the love
more hardware support and more functional tasks with scope creep means larger code base. nothing to see here, move along.
This is like the salesman's nightmare, where you take the guy from engineering to visit the customer. Things are going great, the engineer can answer all the customer's questions.
Then you realize, *the stupid bastard is answering the questions honestly*.
Honesty is a basic requirement to be a halfway decent engineer. Persistent and incurable dissatisfaction with how you did the last job is another. Even if you *know* you did a great job, deep inside part of you knows you could have done it *better*.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Then let's do like most other open source projects when they reach that point : Analyze current version, find good things and bads things, find possible improvement that were impossible because of breakage and legacy. Once the analysis process is complete, start version 3.0 from scratch, implement the new stuffs and improvements, then bring current features in one by one. And don't tell me it cant be done, it has been. And dont tell me it wouldn't be supported : how much time did it take before the 2.6 line has been adopted by industrials and missing critial distro?
Clearly whoever modded you up has never tried what you are suggesting. I can only name a handfull of open source projects that backport security fixes to old versions and of those, they only backport to versions a few years old.
In fact, I'd say the longest lived "old version" is probably Apache 1.3. The 2.x series has been out for, what, forever and yet they continue to push out fixes for 1.3 (last was Jan. 2008).
I'd wager the biggest complaint I have with most open source is the a) dont understand what true stability means and as a result they b) rarely support old versions. It was one of the prime reasons I switched to FreeBSD. If I install FreeBSD 6.2 today, I know I'll get security fixes for at least a good half decade and probably a bit more if I track the 6.x series.
Yeah yeah yeah, debian, yeah yeah... but dont get me started on the other reasons I switched (cough crappy docs, cough, crappy unstable kernel, cough
Bloat isn't bad.
Version 5.0 of Microsoft's flagship spreadsheet program Excel came out in 1993. It was positively huge: it required a whole 15 megabytes of hard drive space. In those days we could still remember our first 20MB PC hard drives (around 1985) and so 15MB sure seemed like a lot... In 1993, given the cost of hard drives in those days, Microsoft Excel 5.0 took up about $36 worth of hard drive space. In 2000, given the cost of hard drives in 2000, Microsoft Excel 2000 takes up about $1.03 in hard drive space...
In fact there are lots of great reasons for bloatware. For one, if programmers don't have to worry about how large their code is, they can ship it sooner. And that means you get more features, and features make your life better (when you use them) and don't usually hurt (when you don't). If your software vendor stops, before shipping, and spends two months squeezing the code down to make it 50% smaller, the net benefit to you is going to be imperceptible. Maybe, just maybe, if you tend to keep your hard drive full, that's one more Duran Duran MP3 you can download. But the loss to you of waiting an extra two months for the new version is perceptible, and the loss to the software company that has to give up two months of sales is even worse.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
Problem is the "bloat" is in code only not in the running kernel.
I can easily compile a linux kernel that runs in very little space on a super slow processor and it screams.
Problem is the "bloat" that Linus is talking about is simply plain old kludgy coding done to get it out the door faster. Adding features need to stop and all kernel coders need to work on cleaning things up. It's the sucky part of the job that nobody wants to do, but it needs to be done. I've seen the insides of some kernel modules that will make your toes curl in fear as they are early prototypes pre-alphas at best.
Do not look at laser with remaining good eye.
Until it causes system instability, slow performance, or increases the size of the code without adding any new features or fixing a problem. Bloat can become a problem, but it doesn't have to be. I thought I would just point that difference out because "isn't" seems to be an absolute which it shouldn't be.
Yea, I was rooting around in your system just the other say. You seem to be completely frugal when it comes to purchasing new software. On a plus side, your system is completely useless to me outside of just exploring around it a little. Good call and staying arcane.
Heh, read the stable_API_nonsense.txt file in the kernel source. Here's an html version:
http://www.kroah.com/log/linux/stable_api_nonsense.html
Next year he's going to claim that Minix was doing it right all along. We've seen a lot of Linusisms to that effect... $X needs to be outside the kernel... $Y shouldn't happen the way I've been screaming for years... I told $Z to fuck off because he's stupid but he was right and we need to go do that yesterday ... it's just how Linus is. He's an opinionated fat bastard, and then one day he realizes he's fucking wrong and just goes, "SHIT! Well let's do that then >:O"
Support my political activism on Patreon.
Let's take a look at the patch history of QNX. QNX is a message passing microkernel mostly used for embedded systems. But it can be run with a full GUI, runs on multiprocessors, and can be run as a server. Millions of "headless" embedded systems have QNX inside. I used it in a DARPA Grand Challenge vehicle. BigDog, the legged robot, runs QNX.
Drivers are outside the kernel. All drivers. File systems are outside the kernel. Networking is outside the kernel. And they're all application programs, not some special kind of loadable kernel module.
There have been 14 patches to QNX in the last two years. Only one is an actual kernel patch: "This patch contains updates to the PPCBE version of the SMP kernel. You need this patch only for Freescale MPC8641D boards." Only one is security-related: "This patch updates npm-tcpip-v6.so to fix a Denial of Service vulnerability where receipt of a specially crafted network packet forces the io-net network manager to fault (terminate)." Neither Linux nor Windows comes close to that record.
There's little "churn" in a good microkernel. Since little code is going in, new bugs aren't going in. Good microkernels tend to slowly converge toward a zero-bugs state.
QNX generally has a "there's only one way to do it" approach, like Python. Linux supports three completely different driver placement - compiled into the kernel, loadable as a kernel module at boot time, and run as a user process. QNX only supports one - run as a user process "resource manager". That simplifies things. A "one way to do it" approach means that the one best way is thoroughly exercised and tested. There are few seldom-used dark corners in critical code.
When QNX boots, it brings in an image with the kernel, a built-in process called "proc", any programs built into the boot image, and any shared objects ".so" wanted at boot. These last two run entirely in user space; they're just put in the boot image so they're there at startup. That's how drivers needed at startup get loaded. They don't have to be in the kernel. (In fact, you can put the whole boot image in ROM, and many embedded systems do this.)
A QNX "resource manager" is a program which has registered to receive messages for a certain portion of pathname space. The QNX kernel has no file systems; part of the initial "proc" process is a little program which keeps an in-memory table of "resource managers" and what part of pathname space they manage. This is similar to "mounting" a driver under Linux, but it doesn't require a file system up during boot. File systems are user programs which start up and ask for some pathname space, after which "open" messages are directed to that file system.
Another QNX simplification is that the kernel doesn't load programs. "exec" is implemented by a shared library. That library is loaded with the boot image, to allow things to start up. "exec" runs entirely in user space, with no special privileges, so if there's a bug in "exec" vulnerable to a mis-constructed executable, that program load fails and everything else goes on normally.
The price paid for this is some extra copying, since all I/O is done by message passing. This isn't much of a cost any more, because you're almost always copying from cache to cache. That's an important point. Message passing kernels used to be seen as expensive due to copying cost. But today, copying recently used material is cheap. On the other hand, some early microkernels (Mach comes to mind) worked very hard to mess with the MMU to avoid big copies, moving blocks from one address space to another by changing the MMU. This seems to be a lose on modern CPUs; the cache flushing required when you mess with the address space on recently used data hurts performance.
I used to pump uncompressed video through QNX message passing using 2% of a Pentium III class CPU. Message passing, done right, is not a major performance problem.