r/linux • • Nov 07 '18

Fluff Lines of code in the Linux kernel

Post image
1.2k Upvotes

169 comments sorted by

View all comments

79

u/CKreuzberger Nov 07 '18

Somebody should send/tweet this to Bryan Lunduke, just to let him know that his recent statement about "how the linux kernel growth is bad for performance etc..." in a talk is not quite true.

95

u/MINIMAN10001 Nov 07 '18

How in the world does a picture of lines of code in the Linux kernel act as evidence of kernel performance.

To quote linus before he changed his stance to "Faster hardware is making it not a problem" he did say

We're getting bloated and huge. Yes, it's a problem ... 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.

To say something isn't a problem because we're getting faster than I'm making it slower is still admitting that you are worsening performance

23

u/udoprog Nov 07 '18

You are right, this is not intended to communicate the performance characteristics of various kernel releases. But you might want to be careful putting too much weight into a comment that is old enough to be in the fourth grade. During this period we've seen a lot of developments, like Linux being pushed harder towards mobile and embedded workloads.

Phoronix did a set of really interesting benchmarks across kernel releases which at least for the last 4 years hasn't showed significant performance degradation in the workloads they tested. Apart from the spectre/meltdown mitigations.

Anecdotally having worked for a company with a ton of Linux servers, fleet wide kernel upgrades don't have a tendency to affect performance much when looking at global CPU or memory utilization. Optimizations in the application layer tend to have a much larger impact.

32

u/Nibodhika Nov 07 '18

Honestly you can use Gentoo or compile your kernel even on other distro, the fact that the code is there doesn't mean it has to be executed or even compiled.

→ More replies (18)

15

u/[deleted] Nov 07 '18

You do know that most of the kernel code is in the form of modules, and is loaded on-demand? Only the core code needed for initialization, memory management, disk management, process scheduling, interrupts etc. has to absolutely be in memory at all times, and that portion doesn't take up much memory (although the data structures used might take up a bit more, it's nothing compared to userspace memory usage).

2

u/zebediah49 Nov 09 '18

Don't forget all the code that's for handling various architectures (looks like about 2M lines), and which will actually be entirely compiled out for every arch other than the one you need.

→ More replies (1)

3

u/s_s Nov 07 '18

He makes the point that some things used to speed up and/or get smaller with every new release, but now that there is so much corporate influence in distros and kernal dev, no one is focusing on those gains anymore.

5

u/StevenC21 Nov 07 '18

This is why I wish we had a microkernel honestly.

5

u/[deleted] Nov 07 '18

They have other problems too!

→ More replies (7)

59

u/[deleted] Nov 07 '18

My friends kid keeps getting bigger, which is crap for performance. All that extra food that child needs to eat daily, when it could just remain tiny forever and be incredibly efficient

15

u/[deleted] Nov 07 '18

That big body will catch up with him when he finds he can no longer run around outside all day without getting winded.

17

u/[deleted] Nov 07 '18

Yes true, he should lose weight - lets cut the legs off to help him run around outside all day without getting winded.

(Are we taking this too far?)

6

u/[deleted] Nov 07 '18

LOL, yes maybe a bit, I was just pointing out that children tend to be little bundles of energy

7

u/[deleted] Nov 07 '18

:)

That's why we invented vodka, knocks em right out! Little bastards can't hold their liquor

2

u/bracesthrowaway Nov 07 '18

I've tried that but my oldest is an angry drunk.

5

u/[deleted] Nov 07 '18

Nothing like a legless overweight furious drunken ten year old crawling in circles in your yard to make us all consider the high amount of code lines in the Linux kernel

2

u/bracesthrowaway Nov 07 '18

Basically this guy

2

u/[deleted] Nov 07 '18

I say we demand we change all linux kernel bug reports so they start with the words "'nary a scratch!"

3

u/[deleted] Nov 07 '18

How is he still a thing?

2

u/[deleted] Nov 07 '18

Correction: It wasn't recent. The video was uploaded half a year ago.

It was unlisted and behind a "paywall". Like pay a buck and get the link kinda deal.

3

u/Menelkir Nov 07 '18

Maybe Bryan's pc is using an obscure distro that loads all modules at boot... and probably still booting...

3

u/[deleted] Nov 07 '18

He pointed out other issues that Linux has now that is "grown-up".

His latest talk is a good one for the community to consider.

2

u/[deleted] Nov 07 '18

That one was really depressing. He said it and it was.

→ More replies (1)