Created
July 2, 2023 10:50
-
-
Save CapacitorSet/29b34ba77e8f6662e79f5894d82aec47 to your computer and use it in GitHub Desktop.
Revisions
-
CapacitorSet created this gist
Jul 2, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ You can use cgroups to cap the CPU usage of processes. Thus, you can make the shader compilation process use less CPU and produce less heat, in exchange for longer compilation times. Requires: Linux, a somewhat recent kernel, possibly a package for cgcreate. ```sh sudo cgcreate -g cpu:/slow # Create a CPU cgroup sudo cgclassify -g cpu:slow $(pidof fossilize_replay) # Move all shader compilation processes to the cgroup sudo cgset -r cpu.max='2000000 1000000' slow # Cap the CPU usage (in this case: to 2 CPUs) ``` You may need to rerun the `cgclassify` from time to time.