Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I know this is 3 years to late but I found this thread and tried to find a way to work this out. It is possible to set the core affinity of a process via PowerShell so I created this script:
- Code
- ##########################################################################################################################################
- $processes = Get-Process
- foreach ($process in $processes){
- if ($process.Name -eq "csgo") {
- $process.ProcessorAffinity=2688
- }
- else {
- $process.ProcessorAffinity=1407
- }
- }
- ##########################################################################################################################################
- You can copy this and put it in a file called <whatevernameyouwant>.ps1
- To execute it on every startup of csgo I created the following task in task scheduler.
- https://pastebin.com/iRABQQay
- You can copy the content to a file called <whatevernameyouwant>.xml
- and replace the paths C:\csgo_but_sexy.ps1 and the csgo.exe path with the path to the powershell file you created and the path to your csgo.exe file.
- After csgo is closed we want to reverse all changes. To do so create a file <whatevernameyouwant_reverse>.ps1 and copy the following into it:
- Code
- ##########################################################################################################################################
- $processes = Get-process
- foreach ($process in $processes){
- $process.ProcessorAffinity = 4096
- }
- ##########################################################################################################################################
- Do the same thing we did before for this task:
- https://pastebin.com/yFibgewd
- And add both .xml files to task scheduler by opening task scheduler and clicking 'import task' and selecting both xml files you just created.
- Now every time csgo starts it will have the cores you want assigned to them. To change the assigned cores you'll have to change the 2688 in the .ps1 file. To find the right number for your affinity configuration first change the assignments via task manager then run Get-Process csgo | Select-Object ProcessorAffinity and copy the number to the .ps1 file. For the reverse script do the same but with a program with all cores assigned.
- I'm on a Ryzen 5 3600 and while the core assigning had a slight impact on performance (~20FPS in the benchmark), the core assignment didn't do much for me (~5-10FPS in the benchamrk) but it can definetly help on Ryzen 3 CPUs.
- And yes I'm bored.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement