Can AI Be Used to Fine-Tune Linux Kernel Performance? (zdnet.com) 66
An anonymous reader shared this report from ZDNet:
At the Linux Plumbers Conference, the invite-only meeting for the top Linux kernel developers, ByteDance Linux Kernel Engineer Cong Wang, proposed that we use AI and machine learning to tune the Linux kernel for the maximum results for specific workloads... There are thousands of parameters. Even for a Linux expert, tuning them for optimal performance is a long, hard job. And, of course, different workloads require different tunings for different sets of Linux kernel parameters... What ByteDance is working on is a first attempt to automate the entire Linux kernel parameter tuning process with minimal engineering efforts.
Specifically, ByteDance is working on tuning Linux memory management. ByteDance has found that with machine learning algorithms, such as Bayesian optimization, automated tuning could even beat most Linux kernel engineers. Why? Well, the idea, as Wang wryly put it, "is not to put Linux kernel engineers out of business." No, the goal is "to liberate human engineers from tuning performance for each individual workload. While making better decisions with historical data, which humans often struggle with. And, last, but never least, find better solutions than those we come up with using our current trial and error, heuristic methods.
In short, ByteDance's system optimizes resource usage by making real-time adjustments to things like CPU frequency scaling and memory management.
Specifically, ByteDance is working on tuning Linux memory management. ByteDance has found that with machine learning algorithms, such as Bayesian optimization, automated tuning could even beat most Linux kernel engineers. Why? Well, the idea, as Wang wryly put it, "is not to put Linux kernel engineers out of business." No, the goal is "to liberate human engineers from tuning performance for each individual workload. While making better decisions with historical data, which humans often struggle with. And, last, but never least, find better solutions than those we come up with using our current trial and error, heuristic methods.
In short, ByteDance's system optimizes resource usage by making real-time adjustments to things like CPU frequency scaling and memory management.
Re: (Score:2)
Re: (Score:2)
We can hope, but there is the danger that they will find another charismatic antihero to lead their antigovernment crusade.
Re: (Score:3)
So far they haven't - the closest thing to a mini-Trump anyone has found is that other idiot from Florida, and he's a joke who regularly cakes his pants at retail politics because he's a deeply unlikeable uncharismatic dumbass who picks culture war fights with organizations who have the resources to make him look even more colossally stupid than he already does, and has to put lifts in his boots so he doesn't look even smaller than he metaphorically already is.
DeSantis has been trying for 3 years to become
Re: (Score:2)
The danger would be a smart and competent fascist. Thankfully they're lead by a dumb and inept one. The good news is that i think the voters don't want smart leaders, because they're too elite, and any sort of competence at governing would be seen as being an "insider".
I mean, the guy who said "People don’t ask that question, but why was there the Civil War?", ignoring that this is a very common high school term paper assignment, and others get their PhD in history by writing a thesis on it. Then de
Re: (Score:2)
I think it would be a better task for AI if Budweiser spent the compute cycles fixing their shitty product problems.
Re: (Score:2)
Nope. (Score:2)
Why? It's very simple to understand: optimization does NOT equals to stability.
You can make a function/program faster and, at the same time, make less stable; and this has been proven million of times already.
AI is unable to inner-processing cause/effect relationship and will always be.
Re: (Score:2)
Re: (Score:2)
And, by the way, AI (ChatGPT, for instance) can understand cause-effect relations just fine.
Re: (Score:2)
I'm not mumbling. Your limited knowledge is funny.
How can you make a program faster?
Remove the checks. This leads to less stable.
Why would an AI do this? Because, as I wrote but you didn't read, "AI is unable to inner-processing cause/effect relationship and will always be."
EditorDavid outdoes himself (Score:2)
"In short, ByteDance's system optimizes resource usage by making real-time adjustments to things like CPU frequency scaling and memory management."
Breathtaking.
Re: (Score:3)
"In short, ByteDance's system optimizes resource usage by making real-time adjustments to things like CPU frequency scaling and memory management."
Breathtaking.
I think you missed a detail:
There are thousands of parameters
These aren't parameters like Amazon's "2 trillion parameter" model. They are tweakables, like the minimum period in nanoseconds for which a single task will run. So try tweaking a few thousand of those numbers by hand.
Re: (Score:2)
And this is just normal machine learning, older tech, not new fangled OpenAI style chat-bot stuff. There are already optimizers that take a smallish piece of code and try out a huge number of permutations to discover the best result - not really AI but just classic algorithms.
Re: (Score:2)
Right. There are a lot of algorithms, but I think of them as "hill climbing" which is the simplest to describe and understand: take a current possible solution, sample new potential solutions in every direction, and move to whichever potential solution has the highest value. Repeat.
I saw something similar to this... (Score:4, Interesting)
... done with tomato-cultivation greenhouses in the Netherlands, balancing out the huge number of factors that go into maximizing revenue (quantity vs. quality vs. timing) while minimizing costs (heat, lighting, fertilizer, CO2, labour in pruning, binding, harvest, etc), with respect to measured and forecast weather and the current state of cultivation and controlling all parameters (heat influx (base, roof), CO2 influx, roof vents, individual fertilizer influxes, when to order what labour, etc).
It utterly trounced human experts. By large margins. That said, it did make some weird decisions to do so - for example, sometimes having particularly high temperatures at times when it was also having workers work (not exactly comfortable), so "worker comfort" probably should have been another parameter. But overall, spectacular results.
Tasteless tomatoes... (Score:3)
Aha, that is the cause of all those tasteless tomatoes ?
Re: (Score:2)
Did you miss the word "quality"? :)
Higher quality tomatoes fetch higher prices. The AI actually focused more on quality than the humans.
There's a number of techniques you can use in cultivation to increase the flavour. One of the tricks of the trade is to "salt the tomatoes", that is, significantly increase the EC right before harvest (higher concentration of fertilizer salts in the irrigation fluid), and/or spread out waterings (let the growth medium dry out more); the foliage isn't happy with you, but th
Nice story you got there. (Score:2)
Nice story you got there.
It's just a shame it is total B.S.
--> reference needed.
Re: (Score:2)
I encountered it as a lecture from the team doing the research, and I don't remember the name, but it was probably this group [hoogendoorn.com].
Re: (Score:2)
BTW, for those not familiar with what I mean by "high yield", I took this picture [googleusercontent.com] a couple weeks back at the research greenhouse.
I guess since we're on the topic of tomatoes, for anyone who cares:
1) Judge your tomatoes' balance between foliage growth and fruit/flower loading; you want a balance. If the balance is too shifted toward the former, the plant is stocky, big deep green leaves hanging down, somewhat pyramidal in shape, thick stem (sometimes hollow), etc. If the balance is too shifted toward the la
Re: (Score:2)
Thank you, that (and your other posts) are very interesting! You've also given me ideas about how to grow my plants better on a small terrace (if I build some overhead scaffolding). If I can grow upward, I can fit more plants, give them more light, and still be surrounded by green. The only issue it doesn't solve is storms. Though if the leaves are ripped off by intense wind, the top ones may grow back.
I wonder how many benefits I'd lose by doing (Kratky) hydroponics versus watering as you suggest, but I su
Re: (Score:2)
There's not really a clear dividing line between hydroponic and non-hydroponic cultivation - hydroponic just implies an at least largely sterile, largely inert growing medium with little CEC or long-term water holding capacity and where decomposition does not meaningfully contribute to nutrients. In commercial cultivation, whatever the medium, root space available to the tomato plants is really small compared to the size of the plants, because they don't need that much, because they're watered consistently
Re: (Score:2)
Thanks for the advice and tips! You've got me doubly motivated to find out which part of my A/B/C hydroponics solution contains the calcium nitrate so I can turn it into an A/B solution. That will make it so much easier to rebalance EC after rain dilutes reservoirs. But is there any disadvantage to this? I already have a visible microbes growing in the solutions. Will it get a lot worse if I mix micronutrients and nitrogen?
The product you linked (or one like it) seems like quite good value for if/when I wan
Re: (Score:2)
Re: (Score:3)
That would be supermarkets. They prefer bland and consistent over tasty but seasonal or with lower yields.
Re: Tasteless tomatoes... (Score:1)
Not just the supermarkets. Here, most tomatoes (many from the Netherlands) are tasteless and barely ripe but they cost 2 quid a kilo. Riper, tastier versions are available but they're much more expensive, up to 10 per kilo and most people don't buy them. Growers, buyers and customers have together decided that cheap and not very good are what the market mostly wants.
I don't understand who buys oranges (Score:2)
Fun fact, most orange juice has all the chemicals that make it taste like orange taken out because they're not very shelf stable. Then artificial flavors are added back in to make it taste like orange juice agai
Re: (Score:2)
The riper the tomato, the shorter the shelf life. Riper tomatoes are softer and more easily bruised. And the varieties big growers sell to big buyers are bred for quick color, thick skin, disease resistance, and high yield, not much flavor.
Re: (Score:2)
I wonder what the weird decisions will be here?
I know that frequency scaling and core-re-energising takes time, so a lot of effort has already been spent on trying to pre-predict when those things will be necessary and start doing them before it's actually required. In the meantime, if you're super keen on fast response times, you just set your scheduler to 'performance' and pay the additional energy bills ("performance" puts all your cores on maximum speed 24x7).
In this one area, I'd imagine some AI could
Re: (Score:2)
AI means all sorts of different things to different people. And the different things often have different approaches. Perhaps what is being called AI here more like what you're proposing than like an LLM.
Re: (Score:2)
These days you often can't have all cores on max. The system just can't remove enough heat, or supply enough power, or both.
You can have individual reach very high clock speeds, if the others are idle. Good for single thread workloads. You can have lots of cores all running at the same time, with lower clocks.
Re: (Score:2)
Nice euphemisms (Score:3)
Re: (Score:2)
they will just get to do something more *interesting* instead,
If you enjoy getting off on people desperate to find new means of sustaining themselves and being considered completely obsolete in every single aspect that might allow them to do so, then yes, it certainly will be interesting times for everyone.
INB4 "They'll just rEsKiLl, and switch to nEwLy CrEaTeD jObS!": These LLMs are Good Enough(TM) for many CEOs to be seriously considering firing entire teams if not entire departments. There is no skill these LLMs cannot learn to the Good Enough(TM) standard. The
Re: (Score:2)
! Reminds me of the backhanded blessing "May you live in interesting times."
I like to ask people what jobs (Score:2)
People stopped answering years ago, right around the time I started asking them to be specific. Before that they'd tell me the jobs were going to be so futuristic my tiny unevolved brain couldn't comprehend them.
Back when I was a kid it was biotech. I just saw a biotech job that required a masters and 7 years of experience in a 12 year old technology that paid $24/hr. The minimum payments on the student loans you'd nee
Re: (Score:2)
When we implement automation or AI, the result will apparently *never* be that humans lose their jobs... they will just get to do something more *interesting* instead, which is nice!
You joke, but this is what has happened throughout all of human history. The invention of the plough dramatically improved efficiency of farming. The invention of the engine improved the application of energy. In every case the result has been a dramatic and fundamental impact on society and the work we do.
We will endure. You will still have a job, maybe a different one, but there's always something to do. Every technological advancement has improved societal efficiency, not removed the fundamental requirem
Re: Nice euphemisms (Score:2)
Well.... (Score:1)
BTDT (Score:4, Interesting)
Kernel tuning (Score:2)
If running the LLM is more expensive in resources than the improvement in efficiency, it's just a waste.
Re: (Score:2)
The purpose of the exercise is to use an LLM to create a tuning program which can then run indefinitely and on many systems. Even a fairly costly LLM run will be earned back quickly.
Re: (Score:2)
Gauging the performance improvements would be an interesting task across multiple systems in different environments. It would have to be profiled extensively under various loads to assert there were in fact gains.
Interesting problem.
Re: (Score:2)
Re: (Score:2)
https://link.springer.com/arti... [springer.com]
Re: (Score:2)
Re: (Score:2)
Middle out doesn't scale... but maybe if we added AI...
Yes, it can. But will it be used? (Score:2)
Same as how intel improved its Battlemage drivers performance by x2.7 in Stable Diffusion, by using a machine learning optimization toolchain [intel.com].
But this is a toolchain, and the important word here is tool. What we call AI serves as a means to accelerate tasks that previously required significantly more time. While some individuals may reject or overlook this reality, doing so puts them at a disadvantage compared to those who leverage AI to their advantage.
If the Linux community collectively opts not to utili
Optimize autoexec.bat and config.sys (Score:2)
This reminds me of the DOS-days of running a program to optimize DOS startup by rearranging the startup files by trial and error, doing a few reboots to see what worked.
I guess they can call bruteforce for AI now?
Re:Optimize autoexec.bat and config.sys (Score:4, Insightful)
Welcome to genetic algorithms.
Re: (Score:2)
Re: (Score:2)
I guess they can call bruteforce for AI now?
If you call gradient descent [wikipedia.org] a brute-force algorithm, then yes.
Re: (Score:2)
"AI" is the buzzword for click bait, so it gets attached to old algorithms and machine learning technique.
An interesting idea (Score:2)
I would have thought an expert system, rather than a neural network, would be best for this, but fashions change.
If you're going to use neural nets or genetic algorithms, then I'd strongly advise against LLMs. I'd probably still use a NN or a GA, but I wouldn't train it on text on the Internet, or indeed on text at all.
What you probably want is to train the NN on a large set of example loads (actual applications running realistic loads), with benchmarking tools profiling the effects of that load. You then t
Re: (Score:2)
I would have thought an expert system, rather than a neural network, would be best for this, but fashions change.
They're suggesting Bayesian optimization, genetic algorithms, and evolutionary algorithms. They aren't suggesting building neural networks or LLMs into the kernel.
Re: (Score:2)
I wasn't suggesting they were. I had worked on the principle that the system would be outside the kernel. But (a) it still has to run on something, and (b) it still has to produce a result that's still valuable by the time the conclusion has fed back to the kernel.
(a) is important. If it's the same machine, then the odds are high that the application that is doing the tuning is taking far more system resources than it is making available through tuning. If it's remote, then those are still resources your OS
Sure, but have they even done the easy stuff? (Score:2)
I see no reason AI couldn't be used to help streamline performance. But you'd still need people with performance tuning experience to determine whether its suggestions were valid, and whether or not those changes cause unintended side effects.
In my experience, hardly any software is ever performance-tuned. It's not that hard, actually. Use a profiler, identify the bottlenecks in the code, find ways to:
- Reduce the number of iterations
- Reduce the time required for each iteration
Of course, sometimes it's mor
Keep AI's hands off optimizing the OS' Wait Loop (Score:1)
Years ago analyzing the distribution/frequency of instruction combinations resulted in a redesign of the machine microcode that caused no significant speed gain. It turned out the most frequently used (now) optimized instruction combinations were mostly resident in the OS' wait-loop code!