Last active
September 11, 2023 13:15
-
-
Save imerr/3fb768eda91704e6983fdea3ec58397b to your computer and use it in GitHub Desktop.
ArchiveTeam docker cpu priority
This file contains 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 characters
# in /etc/systemd/system/at.slice on debian | |
[Slice] | |
# optional: maximum memory usage of this slice, prevents system oom situations if a container balloons due to changes | |
#MemoryMax=20G | |
# if the cpu is 100% maxed out, at.slice processes don't get any cpu at all. They only get cpu if there is otherwise idle capacity | |
CPUWeight=idle | |
# for more options see man systemd.resource-control (or https://manpages.debian.org/bookworm/systemd/systemd.resource-control.5.en.html I guess) |
This file contains 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 characters
# example docker run command, the important part being --cgroup-parent at.slice | |
docker run -d \ | |
--cgroup-parent at.slice \ | |
--mount type=tmpfs,tmpfs-size=2G,destination=/grab/data \ | |
--name at-imgur \ | |
--label=com.centurylinklabs.watchtower.stop-signal=SIGINT \ | |
--label=com.centurylinklabs.watchtower.enable=true \ | |
--restart=unless-stopped atdr.meo.ws/archiveteam/imgur-grab \ | |
--concurrent 5 USERNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment