Sorry for the stupid question but I can’t seem to figure out how to do this.
I currently trying to force Chia to only use a 2080ti for farming and to ignore the A6000 in the machine. I have set chia (GH) to only use the 2080ti in the graphics settings as seen below:
I have also set chia.exe to only use the 2080ti in the nvidia control panel as seen below:
While the 2080ti is doing the majority of the work, the A6000 is still getting 100% usage spikes and the machine apart from chia is totally idle. Currently not a problem but in the near future another project will be using the A6000 and i’d prefer to have it dedicated to that.
Thanks Jacek, that got me to the answer I needed though I did it a different way then in the guide.
In case anyone is wondering, I did the following in my PowerShell window:
nvidia-smi - > This shows you the id’s of each of your gpus
Then to set the visible devices for that powershell session where “1” is the gpu you want to have available.:
$env:CUDA_VISIBLE_DEVICES = “1”
You then simply start your farmer as normal:
.\chia.exe start farmer
Once I did this my 2080ti got hammered much harder and the A6000 sat totally idle. This will of course only be active in that particular powershell window.
Whether you do it through a local (CLI in either PS or CMD) or Settings / Advanced system settings / Environment Variables doesn’t really matter.
Potentially, for those settings that change from boot to boot, a local setting is preferred (querry nvidia-smi / set variable in a script before running GH). On the other hand, if the variable is stable, the global setting may be preferred. The end result is the same (GH cannot tell the difference, as it inherits the env from the window that started it).
I don’t yet understand how to set it globally so that Chia would only see the 2080ti. Surely if I “hide” the other gpu no other program could use it unless it is specifically made available.
The other project uses wsl and docker so I guess its environment variables wouldn’t have the A6000 hidden from it though I might have to hide the 2080ti. I think it has been hard coded to use gpu 0 in any case so probably wouldn’t be a problem.
You already know the order of your cards (from nvidia-smi). So, go to Win Settings / System / About / Advanced system settings (under “Related links” below “Device specification”). That will give you “System Properties” dialog:
Hit that “Environment Variables” button, and you get this dialog:
Depending how you start GH, either add that variable to your account, or to System. If you only operate under your account (log in to it, then start GH), the top one is good enough. In case you want to run it on the system account (for some reason), or any other user, use the one below. From the OS point of view, there is no preference / harm which one you go with.
That variable is purely GH specific, so only GH chia.exe will recognize it and use it (e.g., CNI chia.exe will not be affected by it). On the other hand, the other two options you have tried (settings graphics prefs / nvidia prefs) are global (thus require some extra tuning).
So, you don’t need to worry about anything else being affected by making that variable system wide.
I was not aware about it. Maybe it would be good to mention it in the readme / wiki.
In such a case, that setting should only be applied in the local shell (not through user / system level wide env settings), assuming that the box may be shared for other purposes.
It would be nice if the GPU info (if used and what devices) also be shown in the UI (at least MMX UI). On several occasions I was chasing a problem, where Ubuntu auto-applied some selective updates and screwed the GPU settings up.