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

Re: [HTCondor-users] How to tie slots to cpus ?



On Fri, 2021-09-03 at 09:30 -0500, Greg Thain wrote:
> On 9/3/21 12:21 AM, Valerio Bellizzomi wrote:
> > Greetings,
> > 
> > on a htcondor execute machine with 2 cpus how do I tie slots to
> > cpus ?
> > 
> 
> Good morning:
> 
> I'm not quite sure what is meant by "tie"ing a slot to a cpu.  If
> you 
> absolutely want to lock a specific cpu core to a slot, you can
> configure 
> partitionable slots, and set ASSIGN_CPU_AFFINITY = true, and
> HTCondor 
> will use OS mechanisms to pick affinity-bind cpu cores to slots.  We 
> generally don't recommend this, because, while all processes in this
> job 
> will be locked onto this cpu, HTCondor can't control if processes 
> outside it's control will run on that cpu.
> 
> On Linux, if HTCondor is running as root, it will, by default, use 
> cgroups to constrain the total cpu used by a job to the number of
> cores 
> in the slot the job lands on.  This is better, as the job isn't
> locked 
> to any particular cpu, and if the Linux cpu schedule does it job 
> properly, the overall system throughput should be better.
> 
> 
> -greg

There are some computing programs that run multi-core, the problem at
hand is the following: these programs run multiple threads and threads
communicate heavily with each other within the process, if some threads
run in the first cpu and some other threads run in the second cpu,
there is a noticeable penalty due to cpu-to-cpu communication, thus we
would like to have all the threads run in a single cpu. The underlying
OS workload is negligeable for us.

However I don't want to run HTCondor as root, is there a way to tell
HTCondor to use only one cpu for all the threads in a process while not
running as root?

Regards.