Patrefans
The100 from patreon
The100 patreon

Enhancing Thread Scheduling of Klipper

🕑 Added 2025-02-12 16:33:01 +0000 UTC

Comments

Kahl

Awesome, the extent of your ability is quite impressive!

Matt the Printing Nerd

I’ve always been someone who likes to do a bit of everything. I spent over 15 years in embedded software development, taking on all sorts of roles. Mechanics always fascinated me, but back then, software jobs were in high demand, so that’s the path I took. Over time, I moved more into project and program management, which is what I do for a living now. These days, I’m the guy who connects all the dots—software, hardware, and everything in between—helping different teams work together and making sure things actually get done.

Kahl

What kind of engineer are you?!? I’ve seen mechanical, electrical and now software engineering, good lordy you can do it all it seems!

Matt the Printing Nerd

I’d guess it’s because it’s an easy argument to spin around. I’ve done a lot of research on this topic, and the official answer almost always boils down to one of two things: either the SoC isn’t powerful enough, or you’ve loaded your Pi with too much bloatware. There have been a few discussions about CPU affinity and process niceness, but the general consensus was that Unix should handle thread management just fine on its own—without any manual tweaking. Yeah…

Andrew Basson

Last week I assigned klipper, moonraker and KlipperScreen different CPU affinities and was horrified when the ttc appeared yesterday. Nice work understanding and re-prioritising the threads. Thanks for the post and the insights. You may want to fork moonraker too, as it has a hard-coded klipper repo location :( That's if you want auto-updates in THEOS

Kai Käpölä

Why I hell Klipper developers have not done this before you? I can't understand.

Matt the Printing Nerd

Ahh it's a dirty hack.. I build a python wrapper for pthread_setname_np and build a detour hook for thread.start to inject my custom code.

Alex B

Amazing! How did you rename the threads? New files? Or is it a parameter when scheduling them to run?


More Creators