I wonder if there's an easy way to tell Linux/systemd "don't run this scheduled process if the system is already under heavy load". I *do* want it to run a file indexer on my documents directory, I just don't want it to do so while I'm in the middle of a game.
Conversation
Notices
-
Embed this notice
starkrg@myside-yourside.net's status on Wednesday, 28-Jan-2026 19:16:28 JST
StarkRG
-
Embed this notice
Ryan Castellucci (they/them) :nonbinary_flag: (ryanc@infosec.exchange)'s status on Wednesday, 28-Jan-2026 19:16:28 JST
Ryan Castellucci (they/them) :nonbinary_flag:
@StarkRG you might try nice + ionice, but otherwise I'd write a wrapper script.
-
Embed this notice
Ryan Castellucci (they/them) :nonbinary_flag: (ryanc@infosec.exchange)'s status on Wednesday, 28-Jan-2026 21:03:40 JST
Ryan Castellucci (they/them) :nonbinary_flag:
@StarkRG @dakkar also, oom_adjust exists and may be more generally helpful
-
Embed this notice
starkrg@myside-yourside.net's status on Wednesday, 28-Jan-2026 21:03:41 JST
StarkRG
@dakkar @ryanc That definitely looks like a winner. I'll have to see if it functions as expected.
-
Embed this notice
dakkar (dakkar@s.thenautilus.net)'s status on Wednesday, 28-Jan-2026 21:03:46 JST
dakkar
@StarkRG@myside-yourside.net I think that ConditionMemoryPressure and ConditionCPUPressure may help; they probably need to be added to the scheduled process' unit file (instead of the *.timer)
ExecCondition may also be useful
@ryanc@infosec.exchange -
Embed this notice
starkrg@myside-yourside.net's status on Wednesday, 28-Jan-2026 21:03:47 JST
StarkRG
@ryanc As far as I can tell, everything is nice'd properly, but running the index maxed out available ram 32GB), causing even more drive io, grinding everything nearly to a halt.
I think one or more of the mods I've got installed on the game has a memory leak as this happens a fair bit. The game just got hit by the OOM killer. This sometimes happens when nothing else is going on, but it's normally manageable. In this case, though, KDE's baloo started running an index while I was in the game.
-
Embed this notice