DonationCoder.com Software > ProcessTamer
CPU Affinity
broken85:
Mouser,
do you think it would be possible to at some point incorporate a forced CPU affinity into ProcessTamer (in the same manner as you can force a priority for a particular process)? I've got a dual-core at home and sometimes find that I want or need to change the CPU affinity on some processes.
The option only shows up if you have a dual-core or multiple CPUs, but it is a right-click option in the Task Manager to set it. I'd like to use it with ProcessTamer as I already have a number of forced priorities and it would be sweet to set the affinity automatically when opening a certain app.
I have no idea what actually goes on on the back-end but if you think it would be a possibility I'd be happy to give you any information, testing, etc. on my dual-core machine with x64 at home.
Not urgent, and maybe not even feasible, but just a thought. Thanks!
mouser:
I plan to add this without a doubt, just have to find a little time to emerse myself affinity stuff.
wr975:
Here's a little AHK tool to set affinity of processes, to make better use of multi-core CPUs. I made it for own personal use (for my always running AHK script, as I recently got a dual-core CPU) but thought someone would've interest in it, so here's a self-running version.
It's doing the same thing as the $15 shareware "S.A.D. Dual-Core-Tuner" and is perhaps an useful solution until ProcessTamer :-* can do such thing. It is monitoring the system for certain tasks to appear and sets the specified CPU affinity. It's no longer necessary to open task-manager and set the affinity manually. The tasks and CPU affinity have to be written in a configuration file (.ini).
Instructions:
- Download and start.
Notes:
* To edit this file, right-click the tray icon and select "configure". This will open notepad and reload the configuration. If you edit the ini file manually, you've to restart the tool.
* Creating a shortcut in your startup folder is a good idea.
Credits:
Copied some lines from "IdleRun" by Skrommel. Pure genius. :Thmbsup:
AHK Source:
Spoiler
; Most clever parts of this script copied from "IdleRun" by Skrommel (https://www.donationcoder.com)
; ---------------------------
;#NoTrayIcon
#SingleInstance force
#Persistent
IfNotExist,Task Affinity.ini
{
msgbox, 48, Task Affinity - First launch?, Configuration file "Task Affinity.ini" not found!`n`nPlease edit and restart.
Fileappend,[settings]`n`nTask = newsleecher.exe`,lame.exe`,mp3gain.exe`,quickpar.exe`,hksfv.exe`n`nAffinity = 2`n`n`n`n; Affinity can be:`n; ----------------`n; 1 = first core`n; 2 = second core`n; ...,Task Affinity.ini
Run,Notepad "Task Affinity.ini"
ExitApp
}
TrayMenu:
Menu,Tray,NoStandard
Menu,Tray,Add,Configure,TrayConfigure
Menu,Tray,Add,Exit,TrayMenuExit
IniRead,Task,Task Affinity.ini,settings,Task
IniRead,Task_Affinity,Task Affinity.ini,settings,Affinity
SetTimer, Tasks, 1000
Return
TrayConfigure:
RunWait,Notepad "Task Affinity.ini"
Reload
Return
TrayMenuExit:
ExitApp
Tasks:
Loop,parse,Task,`,
{
Process,Exist,%A_LoopField%
if errorlevel <> 0
{
Affinity_pid:=ErrorLevel
Affinity_Process:=DllCall("OpenProcess","UInt",0x1F0FFF,"Int",false,"UInt",Affinity_pid)
DllCall("SetProcessAffinityMask","UInt",Affinity_Process,"UInt",Task_Affinity)
DllCall("CloseHandle","UInt",Affinity_Process)
}
}
Edit: New version. Won't use external process.exe anymore.
broken85:
Your script looks great wr975, I can't wait to get home and try it out!
I'm curious as to what it actually does; which processes does it change the affinity of? Or is it CPU load-based?
I thought maybe looking into S.A.D. Dual-Core-Tuner would give me more info, but all the information I have pulled up so far has been in German and I am much too lazy (or is that "busy at work") to translate at the moment. I'll check more into this tonight too! Anything that will increase the usefulness of my dual core processor deserves further investigation. And I'm glad we already have an AHK alternative thanks to wr975!
beyondlogic.org isn't a bad site either, seems like it has some useful administrative tools! Thanks for the link :Thmbsup:
Ampa:
SMP SeeSaw, by Mike Lin, is a little freeware util that allows easy management of dual-cpu affinities...
SMP Seesaw is a utility for dual-CPU or dual-core computers that controls how Windows balances the compute load between the two processors. By default, Windows balances the processing load to both CPUs as evenly as possible among all programs. SMP Seesaw provides a convenient means to change the processor affinities for all running programs at once. In particular, the most common use is to dedicate one of your processors to a single program, thereby improving the performance or responsiveness of that program.-the author
--- End quote ---
An aside... I like Mike's use of 'glaring eyes' above his donation button - he must have read THIS research.
Navigation
[0] Message Index
[#] Next page
Go to full version