Files
2026-08-25 16:26:52 -04:00

2.0 KiB

title, type, source, source_url, author, handle, post_id, date, archived, draft, tags, description, in_reply_to
title type source source_url author handle post_id date archived draft tags description in_reply_to
Linux by default doesn't allow any increase in scheduling priority. archive twitter https://x.com/NOTimothyLottes/status/2072135292115427728 NOTimothyLottes NOTimothyLottes 2072135292115427728 2026-07-01 2026-08-23 false
archive
twitter
NOTimothyLottes
Linux by default doesn't allow any increase in scheduling priority.

Source

Thread

1/ @NOTimothyLottes ^2072135292115427728

Linux by default doesn't allow any increase in scheduling priority. Users need to manually setup special user|group with elevated rights. Also system calls that try elevated scheduling don't clamp, instead they fail -EPREM if out of bounds. So all around a pain in the ass.

2/ @NOTimothyLottes ^2072136089070961073

I'm a little lazy right now and don't feel like trying SteamOS big picture mode to see what the default ulimits are. Curious what they allow.

3/ @NOTimothyLottes ^2072147378480566273

Linux priority workarounds (a.) Use getrlimit() to get {soft,hard} limits (b.) Use setrlimit() to set 'soft=hard' limit (c.) Then set priority or nice based on new soft limit

4/ @NOTimothyLottes ^2072147765157638479

I don't do one-time global priority maximums, just in case someone sudo's higher priority hard limit dynamically it should pickup the new limit.

5/ @NOTimothyLottes ^2072149707107787035

Also while on setrlimit, I also bump up the RLIMIT_MEMLOCK to it's maximum just in case before the mlockall().