6 ms·
AMD and Valve Working on New Linux CPU Performance Scaling Design
- zamalek 5y agoOne of the great successes of Intel has definitely been establishing their processors as the default optimization status quo. Beyond the scheduler, compilers also optimize (by default) for Intel instruction latencies and pipelines. One way to remedy this would be to ship more distros with march=native as the default. You only need to specify the architecture when you are building binaries for distribution (which mostly happens on CI servers these days). This would result in better perf on not only AMD chips, but also newer Intel chips.
- hyperman1 5y agoI wonder if it is worth it to select a few core libraries like glibc, and get the distro to install multiple variants, each optimized for a different CPU.
- fsaintjacques 5y agoglibc already does dynamic dispatch for the memcpy family of functions.
- jcranmer 5y agoRecently (in the last year or so), the platform ABI for x86-64 has been augmented with 4 levels of variants: base x86-64 (i.e., up to SSE2), and then assume up to SSE4.2, assume up to AVX2, and then a base AVX-512 level. (Not mentioned in each of these levels is the random other instructions, such as BMI/BMI2 that get sprinkled throughout.)
- scns 5y agoIntels Clear Linux does this IIRC. Wins most comparisons on Phoronix. Works on AMD CPUs too. (edit) Even though i'm a sucker for efficiency/performance, i prefer Tumbleweed myself. Since i like KDE, whose integration is as good as it gets on SUSE but left a lot to be desired on Clear which ships with GNOME by default. Both are rolling releases. SUSE has automatic btrfs snapshots on updates for easy rollback. But Clear has the performance edge. https://www.phoronix.com/scan.php?page=article&item=ubuntu-2104-clear&num=4 https://www.phoronix.com/scan.php?page=article&item=ubuntu-2... https://www.phoronix.com/scan.php?page=article&item=cascade-lake-2021&num=3 https://www.phoronix.com/scan.php?page=article&item=cascade-... https://www.phoronix.com/scan.php?page=article&item=icelake-xeon-6linux&num=5 https://www.phoronix.com/scan.php?page=article&item=icelake-... Oh nice this one shows Tumbleweed is not far behind: https://www.phoronix.com/scan.php?page=article&item=amd-epyc7543-11way&num=4 https://www.phoronix.com/scan.php?page=article&item=amd-epyc...
- oscardssmith 5y agoImo, the solution is to stop using C/C++ for high performance applications. Today's computers are diverse enough that distributing compiled binaries leaves a ton of performance on the table.
- josephg 5y agoWhat would you like you use instead? C/C++ code which targets generic x86_64 is a few percent slower than march=native but that still leaves it way faster than most other languages.
- oscardssmith 5y agoI think Rust and Julia are 2 of the stronger contenders.
- setr 5y agoRust also produces compiled binaries?
- 10000truths 5y agoFor x64, you don't need to distribute multiple binaries. You can have one binary with variants of a function each optimized for a particular microarch, and resolve which variant to use at runtime using the CPUID instruction. gcc already does this for you with function multiversioning, and glibc makes use of it for its string routines.
- Abishek_Muthian 5y agoIntel P state drivers and linux schedulers are working great on my recent generation CPU. Power saving is important to me so I run PowerSave governor with turbo boost enabled, for most of my work load it stays at lowest P states with <50 deg C core Temp and during demanding tasks it scales up without delays. It's unfortunate that AMD's scaling is not par with intel on Linux, I didn't know this earlier.
- jeffbee 5y agoI don't think it's even slightly true that compilers default to Intel-specific optimizations. All the Linux compilers default to k8-generic, an obsolete AMD platform.
- 2bitencryption 5y agoIf Steam Deck reaches even a moderate level of success, it will be a huge incentive for developers to make games target Linux (or, more likely, the Proton compatibility layer).
- babypuncher 5y agoI actually prefer for devs to target Wine/Proton compatibility instead of providing native builds. Native games can break over time. I have lots of older proprietary Linux games that aren't super straightforward to get running on modern Linux distros, usually because they rely on libraries that aren't included by default anymore (and sometimes not even maintained). The Steam runtime smooths this over a bit, but I still run into native games from only 4 or 5 years ago that are now broken out of the box. Proton has the benefit of being a "framework" that isn't likely to be abandoned anytime soon. It is essentially a re-implementation of a platform whose primary selling point is long-term backwards compatibility and API stability. It abstracts (or outright eliminates) most of the variability between Linux distros. Plus, games running in it can run mods that rely on DLL injection.
- some-guy 5y agoIronically, many games I install on Steam run better in Linux under Proton than Windows 10 (especially from the 98/XP era)
- babypuncher 5y agoI think this usually boils down to incomplete or buggy support for older 3D apis in modern graphics cards, as the fixes for these games almost always end up being to use a wrapper that translates them to modern Vulkan or DirectX like dgvoodoo or nGlide, similar to what Proton already has to do for these games.
- techrat 5y agoEven brand new ones. On my Windows 10 system, Katamari Reroll wouldn't even launch. Just a black scfeen. In Proton on my xUbuntu desktop, it runs flawlessly. I tend to expect older games to run better due to Microsoft depreciating older Windows libraries and apis, but a native newly released title was surprising.
- Fire-Dragon-DoL 5y agoWow, Valve is rocking! I'm so hoping steam deck goes big. Suddenly we have pc gaming as portable version... Could be insane