←back to thread

256 points BSDobelix | 10 comments | | HN request time: 0.589s | source | bottom
1. usr1106 ◴[] No.42163756[source]
Interesting. But if tuning parameters to their best values were easy, shouldn't the kernel just do that in the first place?
replies(5): >>42163778 #>>42163824 #>>42163880 #>>42164567 #>>42167444 #
2. nitinreddy88 ◴[] No.42163778[source]
It depends on workload. This tool generates recommended config for that specific machine workload. App Nodes can have completely different recommendations vs Database Nodes. It will be completely different for Workstation.
replies(1): >>42163814 #
3. usr1106 ◴[] No.42163814[source]
Sure, but the kernel could just do the same. Of course the kernel is already too big. Is BPF the right level to make it more modular? Just thinking, I don't think I have the answer.
4. onetoo ◴[] No.42163824[source]
This doesn't necessarily find the best parameters, and it doesn't necessarily do it easily. From my reading, it will converge on a local optimum, and it may take some time to do that.

In theory, I don't see why the kernel couldn't have a parameter-auto-tune similar to this. In practice, I think the kernel has to work in so many different domains, it'd be impossible to land on a "globally good enough" set of tuning heuristics.

I'm far from a kernel developer, so I'm ready to be corrected here.

IMO if we ever see something like this deployed widely, it will be because a popular distribution decided to install it by default.

5. RandomThoughts3 ◴[] No.42163880[source]
I would reverse the question: if it can be done by a BPF module, why should it be in the kernel?

Distributions turning it on by default is another story. Maybe it deserves to be shiped on all the time but that's not the same thing as being part of the kernel.

replies(1): >>42164008 #
6. jiehong ◴[] No.42164008[source]
Indeed!

The kernel might already be too monolithic.

This kernel parameters optimisation reminds me of PGO compilation in programs.

Yet, perhaps the kernel could come with multiple defaults config files, each being a good base for different workloads: server, embedded, laptop, mobile, database, router, etc.

replies(1): >>42166453 #
7. sgarland ◴[] No.42164567[source]
I’d rather the kernel present a good-enough but extremely stable set of configs. If I’m using a distro like Arch or Gentoo, then sure, maybe run wild (though both of those would probably assume I’m tuning them anyway), but CentOS, Debian, et al.? Stable and boring. If you change something, you’d better know what it is, and why you’re doing it.
replies(1): >>42170448 #
8. 6SixTy ◴[] No.42166453{3}[source]
I second the different profiles for server, laptop, and so on. Though I know the kernel already comes with default configs, so I think there could be room for specialized kernel config options in addition to what's already there.

Though in my opinion, there's already kind of too much segmentation between the different use cases. A server is just a role for a computer, and embedded could literally mean anything. Quite a few WiFi access points come with a USB port on them so you can plug in a USB drive and start a SMB server.

9. LinuxBender ◴[] No.42167444[source]
HP-UX and to a lesser degree AIX had some of this. Instead of just static tunable values there were some tunable formulas exposed to the admin. If one knew what they were doing they could change the formula as needed without having to recompile the kernel. I would not mind something like this being exposed from the Linux kernel as tunable options as opposed to just static values. Such options could reduce the number of companies that need to recompile the kernel.
10. withinboredom ◴[] No.42170448[source]
These parameters affect things at the hardware level, and in the kernel. There’s “good enough” defaults already, but if you want to take full advantage of your specific hardware, you need to tune it. This is especially important the more different your hardware is from kernel developers’ computers (like 10g nics).