Navigate Select ESC Close

Rust-Based Linux Scheduler Is Faster | Prime Reacts

2024-01-18 Science & Technology
98.0k
2.6k
295
ThePrimeTime
ThePrimeTime
1.1m subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Recorded live on twitch, GET IN https://twitch.tv/ThePrimeagen Become a backend engineer. Its my favorite site https://boot.dev/?promo=PRIMEYT This is also the best way to support me is to support yourself becoming a better backend engineer. Reviewed article: https://www.phoronix.com/news/Rust-Linux-Scheduler-Experiment By: Michael Larabel | https://twitter.com/MichaelLarabel MY MAIN YT CHANNEL: Has well edited engineering videos https://youtube.com/ThePrimeagen Discord https://discord.gg/ThePrimeagen Have something for me to read or react to?: https://www.reddit.com/r/ThePrimeagenReact/ Kinesis Advantage 360: https://bit.ly/Prime-Kinesis Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other)) https://turso.tech/deeznuts

Top Comments (10)

@maximumPango 2024-01-18

Whoa whoa whoa I game all the time on Linux

543 24 replies
@deconline1320 2024-01-18

The default scheduler algorithm in Linux is a trade off to be good in a wide range of tasks and situations. I personally worked in the past to hack the Linux kernel/scheduler to be more performant for our specific embedded product. Usually when you optimize some aspects of the system, you end up deteriorating the performance of something else.

288 7 replies
@KevinInPhoenix 2024-01-18

An "apples to apples" comparison would be to have the same code written in C rewritten in Rust. If the Linux scheduler algorithm is different between the C and Rust versions then you are not comparing the languages, you are comparing the algorithms.

273 26 replies
@Dehibernation 2024-01-18

Gaming is great on Linux. It was my sole dealbreaker when I decided to switch away from Windows and I'm yet to find any issue that's made me go back. Performance is often on par or better and I think a lot of people have no idea how good it's gotten since they've last checked.

108 16 replies
@timseguine2 2024-01-18

I remember my Intro to Operating Systems course at university. And we spent a really long time discussing different scheduling algorithms and their benefits and drawbacks. One of the issues that we discussed constantly about the different algorithms was starvation. Without looking at it I'd say the most likely explanation for the "improved performance" was that it was making choices that would lead to thread starvation more generally.

83 3 replies
@pedrorocha6203 2024-01-18

The aim of the scheduler is not to improve the main task that the user is using, but increasing the efficiency of utilization of resources by going around the system bottlenecks. If the user wants fast framerates, then it should stop the background tasks. What the guy should have done was showing that all resources are being used to their maximum limit, minimizing the effect of the largest bottleneck.

57 2 replies
@feschber 2024-01-18

For this one I think you are kind of missing the point: A scheduler is always a tradeoff between - throughput - latency / interactive performance - fairness (no task is ever stalled / suffocated) I could easily write a scheduler (well not easy but ykwim) that runs terraria 10x faster with a compilation in the background: the scheduler that always prioritizes terraria over everything else. Now does the rust scheduler have 2x performance in terraria while compiling a Kernel? Maybe Is it as good at throughput, latency, fairness as the Linux scheduler? Probably not. Also the language of the scheduler has basically nothing to do with the performance because a somewhat decent scheduler maybe runs 0.01% of the time on a system The author also never claimed that it had anything to do with rust

27
@Kersich86 2024-01-27

there is a whole science in measuring program performance... this guy never got the memo.

1
@alexpyattaev 2024-01-19

Compiling in background is a good approximation for discord and twitch stream.

1
@rosswaald 2024-01-19

Never had any issue gaming on Linux. I use Arch btw

1

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot