News for hackers. Stuff that matters.
Re:Linux with “memory folios”: a 7% performance boost when c... by jeffbee on Monday June 14, 2021 @11:47PM (#27511054)
That's quite a bad take. You can bank on PGO+LTO of a C++ server being good for 20% throughput easily, and not compiling for k8-generic when you have a modern machine also makes a big difference. I would agree that just flipping compiler flags might not get you very far, but there are key inputs that you shouldn't leave on the table.
Re:Linux with “memory folios”: a 7% performance boost when c... by astrange on Tuesday June 15, 2021 @12:21AM (#27511261)
By "not that much" I mean orders of magnitude. 20% is reasonable, especially for C++ that needs a lot of inlining.

But a more modern language would benefit from defining some optimizations like inlining as mandatory, the same way tail calls are (and of course GCC has this.) Then there isn't a chance of deploying a build with extra-slow behavior.

Re:Linux with “memory folios”: a 7% performance boost when c... by josephg on Tuesday June 15, 2021 @12:42AM (#27511374)
A performance improvement of 20% would be a massive win for something as large and widely used and as the linux kernel.

That would average out into a few percentage points of performance improvement in every application across the globe which runs on linux / android. Merging a patch like that in linux would be like quietly reaching into every device across the planet and giving them a small, free CPU improvement and drop in power usage. Not game changing for any individual user, but huge in aggregate.

Re:Linux with “memory folios”: a 7% performance boost when c... by arp242 on Tuesday June 15, 2021 @01:30AM (#27511654)
And if you run a lot of servers it means you need fewer servers. These kind of changes can literally save millions.
Re:Linux with “memory folios”: a 7% performance boost when c... by jeffbee on Tuesday June 15, 2021 @01:31AM (#27511661)
Which is why the organizations which stand to save millions by building their kernels with PGO already do it.
Re:Linux with “memory folios”: a 7% performance boost when c... by josephg on Tuesday June 15, 2021 @04:28AM (#27512654)
Some do. I bet lots of companies miss out on massive cost savings like this simply because nobody at the company has the skills and access to improve things.

I heard a story - years ago Google hired an engineer who happened to be an expert from a previous life in video codecs. He wasn’t working on YouTube at Google, but out of interest he pulled up the YouTube source code to see what it did. They were just using the defaults for some of the encoding parameters. He tweaked a few of the encoding parameters and in doing so saved Google millions of dollars per year in compute/storage/network traffic. A few hours of his work was probably more beneficial for Google than years spent in his primary role.

And if tuning opportunities like this abound at Google, you know they’re everywhere. It’d be much better if Linux distributions simply shipped kernels which are already compiled with PGO, with a reasonable profile based on normalish use.

Re:Linux with “memory folios”: a 7% performance boost when c... by astrange on Tuesday June 15, 2021 @02:59PM (#27519924)
That could've happened because of pointless detuning - x264 comes with good defaults for everything, but then ffmpeg on top of it used to set everything to "off" no matter what it was, and they were probably using the ffmpeg settings.

The correct answer would've been for ffmpeg to not ship that way.

Anyway, I am an expert on video codecs just like that guy is, and I said what I said ;)

Re:Linux with “memory folios”: a 7% performance boost when c... by arp242 on Tuesday June 15, 2021 @08:28AM (#27514291)
Probably, but there are many smaller outfits that probably don't because they have a server fleet of "only" a few dozen servers or so. The cost savings for those won't be in the millions, but having to purchase ~5% fewer servers is still a pretty good win.
Re:Linux with “memory folios”: a 7% performance boost when c... by jeffbee on Tuesday June 15, 2021 @09:56AM (#27515587)
Most smaller orgs are wasting resources on poor utilization. Tighter code just gets those orgs even worse utilization.