mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 13:02:03 +00:00
[GH-ISSUE #204] How to specify the number of cpus and memory available to each App launched by wolf. #137
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DRFR33MAN24 on GitHub (May 22, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/204
Hi and thanks for this great project, I was just wondering: since wolf is designed to handle multiple streaming sessions in isolated docker containers, how can I set the maximum cpus and memory for these apps, the scenario let's say multiple client are streaming video games on the same machine and one of them is causing a bottleneck, this would certainly reflect on others.
it would be cool if I can set max cpus in config.toml and wolf would bypass these as docker run arguments, now in 4 cpu machine I can fix each client with two cpus and avoid unbalanced usage.
something like:
docker run --cpus="2" firefox
docker run --cpus="2" retrostream
@ABeltramo commented on GitHub (May 22, 2025):
You can tweak all sorts of low level Docker details by editing the
base_create_jsonproperty in theconfig.toml. That JSON config comes from the Docker APIs for creating a container and will be merged with all the other parameters that Wolf needs.Now, specifically for CPU limiting there are a few different options in Docker like:
CpuPeriod,CpuQuota,CpusetCpus(you can see them if you open up theHostConfigobject definition in the link that I've posted aboveThe easiest option for you seems to be
NanoCpuswhich should be equivalent to set--cpus(just in nano seconds notation). So to set2like in your example you'll have to set2000000000IIUC.To recap: given the Firefox default
base_create_jsonconfig, you'll have to edit it to be:And this will be equivalent to start the container with
--cpus="2".Let me know if that works!
@DRFR33MAN24 commented on GitHub (May 22, 2025):
Great thank you, because the other day I was running two apps with PCSX2 image and I tried god of war 2 on one of them, it made the other app stutter significantly.
However does this option mean 2 ghz clock speed or 2 cores?
@ABeltramo commented on GitHub (May 22, 2025):
It should mean 2 cores, same as
--cpus, but I haven't tested this myself..@salty2011 commented on GitHub (Jun 13, 2025):
Some of the basic functionality as @ABeltramo stated is covered through the container launch options you can specify in the App configuration.
Im chiming in here cause I think some of this capability to configure could live in WolfManager to make doing some of these settings more easy.
Have created an issue in WolfManager for basic app management... to this idea isnt lost