Those who don't understand UNIX are condemned to reinvent it, poorly.

Main menu

Post navigation

setting affinity on smp systems (in my case: for rose online)

On windows, you can set the processor affinity for hardwaredrivers and application programs.
I don’t usally have to set driver affinity any more, last time I did that was on an old quad ppro.

Reasons to not use irq affinity any more:
if your caches aren’t separate, the driver code will be in the cache of the active cpu (core) anyway.
so if you got a dualcore cpu with one shared cache, it doesn’t really matter. it mattered back when you had 4 (or even 6 on my ALR Revolutiion 6×6) different caches in the system and a wandering driver process (irq handler) would not benefit from caching everytime it ran on a new cpu, and also the cpus back then were so much slower that it was really helpful to dedicate whole cpus to single tasks.
still, for reference, the tool of choice was called irqfilter and it is quite easy to use so I won’t go into detail here…

process affinity is a different beast because:

windows has a quite bad scheduler and will lose some performance by not keeping a process (or thread) locked onto a single core

some software has bad internal loop timers and will run unreliably if it hops from cpu to cpu. with the game “rose online” I experience most ugly results due to this. sometimes it’ll be in slow motion, sometimes it’ll be too fast to play. unreal tournament was even worse 🙂

you want to restrict software that uses up insane amounts of cpu to only subset of your full cpu power, i.e. 1 core and its associated hyperthread on a Core i7 cpu.

step by step:
download the w2k server resource kit
identify imagecfg.exe and copy it to %systemroot% so it’s in your path
launch a cmd box