[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] CPU Affinity Controlling




Can you describe how CPU affinity control works?

The documentation is lagging on this feature, but here's a quick overview. It only works on Windows and recent linux versions.

If you haven't changed NUM_CPUS to support extra slots, and you want one CPU core per Condor slot, just set

ENFORCE_CPU_AFFINITY = true

in the condor_config file on the startd side, and each slot will be bound to a single CPU core. If affinity is being set, and D_FULLDEBUG is on, there will be a line indicating this printed to the StarterLog. If you want more control, you can set ENFORCE_CPU_AFFINITY=true and set the CPU affinities per slot by saying, for example:

SLOT1_CPU_AFFINITY=0,1
SLOT2_CPU_AFFINITY=1,2,3

which means that jobs on slot1 run on cores 0 and 1. Note that slots are enumerated with 1 based numbering and CPU cores with zero based.

We are interested in feedback and the results of using these settings in real world job mixes. Our belief is that enforcing CPU affinity will increase fairness and potentially decrease overall throughput. The Linux process scheduler is said to be designed to share priority when a parent process forks, so that spawning many processes doesn't improve your effective priority.