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

Re: [HTCondor-users] sharing CPU

On 3/2/2015 2:17 AM, Ricardo Oda wrote:
Sorry, I meant core instead of CPU.

Is it possible to assign a single core of the CPU to different slots of
execution? And maybe limit a percentage of the core to each slot.

So jobs that doesn't require much CPU, like IO intensive, can share the
CPU core usage with other jobs.

Currently CPUs in HTCondor slots need to be an integer, although in a future release we hope to support fractional cores.

Although it is a bit inelegant, you can achieve what you want right now by telling HTCondor your machine has more CPU cores than it really does via the NUM_CPUS config settings, which defaults to $(DETECTED_CPUS). So for instance, you could tell HTCondor a machine has 4 times the cores it really does via the following in condor_config :


Now every htcondor "cpu" provisioned by HTCondor is really only 25% of an actual CPU core, so if you made a slot with one CPU that slot in reality would only have 25% of one core. If you want to enforce that the job will not use more cores than provisioned, either enable cgroups support (see the manual) or set


in condor_config - both ASSIGN_CPU_AFFINITY and cgroups enforcement do the right thing when HTCondor is told there are more cores than the machine actually has.

Hope the above helps,