Torvalds: Linux is "bloated and huge"
Posted on 22 Sep 2009 at 08:02
Linux creator Linus Torvalds has branded the operating system's kernel "bloated and huge".
Although it's Windows that's usually fighting off accusations of bloatware from the open-source community, the ever-outspoken Torvalds decided to open fire on his own OS at the LinuxCon conference.
Torvalds claims that the increasing number of features being added to the Linux kernel is fattening the OS beyond recognition. "We're getting bloated, yes it's a problem," Torvalds said, according to a report on Internetnews.com.
In 1994, Linux 1.0 was released with 176,250 lines of code. Version 2.6.30 contains 11,637,173 lines
"I'd love to say we have a plan [to make it slimmer]. I mean, sometimes it's a bit sad and we're definitely not the streamlined hyper-efficient kernel that I had envisioned 15 years ago. The kernel is huge and bloated."
The facts bear out Torvald's claims. In 1994, Linux 1.0 was released with 176,250 lines of code. Version 2.6.30 of Linux, which was released in June this year, contains 11,637,173 lines - 66 times as many as the original. Although it still has some way to go to beat Windows Vista, which reportedly contains 50 million lines of code.
Despite the kernel's expanding waistline, Torvalds insists he's happier with the Linux development process. "I don't spend all my time just hating people for sending me [code] merge request that are hard to merge," Torvalds said. "For me, I need to have a happy feeling inside that I know what I'm merging. Whether it works or not another issue is a different issue."
And he also insists his infamously short fuse isn't growing any longer. "I really enjoy arguing - a big part of my life are these occasional flame threads that I love getting into and telling people they are idiots," Torvalds added. "All my technical problems were solved so long ago, that I don't even care. I don't do it for my own needs on my machine, I do it because it's interesting and I feel like I'm doing something worthwhile."
Author: Barry Collins
@Barry Collins
11.6m vs 50m code lines. That's an apples and oranges comparison - you're comparing just the Linux Kernel to the total Vista OS. Surely you should compare the total number of code lines in one of the mainstream Linux distros to Vista??
By rjp2000 on 22 Sep 2009 
50 million?
I'm sure the Windows kernel is nowhere near 50 million lines of code.
By iwilson on 22 Sep 2009 
Does number of lines = bloated?
It's a very crude measure to look at a project say "oh, that's got such and such number of lines of code, it's so bloated"
Linux 1.0 was much smaller than 2.6.30 because it does more things. That's just how this works, programs are lists of instructions and the more instructions you give it the more it can do.
You just need a certain number of lines to do certain things, if you want your scanner to talk to your computer you need a certain number of lines to do that, if you want another scanner to talk to your computer you need more.
Why is "lots of code" automatically bloat? It can certainly be a sign of bloat but shouldn't you look at performance or some other metric instead?
By steviesteveo on 22 Sep 2009 
Envy or confused?
It's even worse than just very crude as some people simply don't want to accept that out there is another operating system and is simply confusing them.
I think that video WINDOWS VISTA AERO VS LINUX UBUNTU BERYL shows enough but that's not enough for some scared people.
Thanks to Dell and other brands Linux is becoming more popular even if it has 4x lesser core lines comparing to system with looooong history and still not very well secured.
By only_exciter on 24 Sep 2009 
lines = bloated
I think Linus is in a good position to make a judgement.
Your scanner analogy is a good one - a lot of the time when we add new features, we do tend to do it by adding new code, often on optional paths.
Equally, quite often you find bits of code added in for things that are no longer required, but generally people are scared to remove functionality.
Generally speaking, I find that if I really look at some of my existing code, and refactor or rewrite it from scratch in the light of the current requirement, I can usually do it in a third of the size.
Another way to reduce code size, is to use higher-level programming features (closures / lambdas for instance, can really reduce code size, as can using Python or Ruby rather than C). Of course there is usually a performance cost in doing so, which is why OS kernels are almost always written in pure C.
I wonder if Linus is still so harsh on the micro-kernel approach (which keeps drivers, etc, out of the kernel itself). Check the Kernel page on Wikipedia and the links on Microkernels and Linus role in the debate, and maybe also read up on XNU as a comparison - note that XNU has also become more bloated/less micro-kernel based over time.
There are other bloat metrics like cyclic complexity - i.e. how much cross-referencing exists between code modules / classes - or stack depth analysis (how many layers of abstraction do you need?).
By JulesLt on 24 Sep 2009 
What about the Interpreter?
@Julest: "Another way to reduce code size, is to use higher-level programming features (closures / lambdas for instance, can really reduce code size, as can using Python or Ruby rather than C)."
The number of lines of code in a Python or Ruby script might be fewer than the equivalent C code, but you are forgetting to add the number of lines of code in the Python/Ruby interpreter which is needed to run the code. C, of course, is compiled.
By 6tricky9 on 24 Sep 2009 
Why not load it up in Word and use 'Find and Replace' to swap all out the line breaks for spaces?
Simples.
By Mark_Thompson on 24 Sep 2009 
advertisement
- 10 ways to boost traffic to a WordPress blog
- Reaction to the Apple iPad: ten days later
- How to switch off Virgin Media's mobile broadband image compression
- Infotec/Ricoh: here not to help
- TomTom 940T vs iPhone TomTom: a real road test
- Nvidia Fermi update: they have names!
- Twitter oven lets you have your cake and tweet it
- Where online businesses go terribly wrong
- Google Nexus One: first look review
- Dreading the move to ADSL
- The hidden treasures of Sysinternals
- Microsoft must stop silently installing browser plugins
- Crack the Microsoft Server 2008 Core with CoreConfig
- Forget Windows: SMBs should try Snow Leopard Server
- Poking into Facebook security
- Has Microsoft shot itself in the foot with Security Essentials?
- Smashing the BlackBerry myths
- Has Microsoft solved our stylesheet woes with Super Preview?
- Automated printing of SQL Server Reports
- Setting up iSCSI on a desktop PC
advertisement
Printed from www.pcpro.co.uk


