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

Re: [HTCondor-users] sharing CPU



That's really nice, Thanks Todd.
Some questions:

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 :

 ÂNUM_CPUS = 4 * $(DETECTED_CPUS)

When I do what is told above, will Condor correctly assign each core for exactly 4 slots?Â
Are cores hard mapped to slots?

And you think this trick of increasing the number of detected cores will also work with dynamic slots?



On Mon, Mar 2, 2015 at 2:01 PM, Todd Tannenbaum <tannenba@xxxxxxxxxxx> wrote:
On 3/2/2015 2:17 AM, Ricardo Oda wrote:
Sorry, I meant core instead of CPU.

Refrasing:
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 :

 ÂNUM_CPUS = 4 * $(DETECTED_CPUS)

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

 ASSIGN_CPU_AFFINITY = True

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,
Todd

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@cs.wisc.edu with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/