Reuti <[email protected]> writes:

> Raymond Wan <[email protected]> writes:

>> I'd like to create queues that limit the number of threads that can be
>> used.  For example, suppose it has 4 cores and 4 x 2 = 8 threads.  Is
>> it possible to create queues that:

I don't understand the need to create queues.  To run multi-threaded
programs, I'd allocate one slot/thread and limit slots to the number of
cores per host, or possibly the number of hardware threads.  Recent SGE
has a default "smp" PE intended for that.

>> 1)  Can use at most n threads (i.e., n=2).  If the user places
>> something on the queue that uses 4 threads while running, the user's
>> job is either killed or suspended.

There's no support for counting the number of threads or treating it as
a runtime limit, and it would be system-dependent.

>> 2)  Can stick to using only one core.  So, if threads is n=2, then
>> both threads are on the same core ("guaranteed").

On Linux, SGE 8.1.2 can use cpusets to confine jobs to the core binding
in effect, and there's old support for similar features on some
proprietary unixes.

>> I guess (2) is impossible...I'm not sure if the system knows which
>> thread goes with which core.
>> 
>> But I guess (1) is possible but I don't know which option to set.
>> What I'd like to prevent is having a queue with 2 threads and users
>> putting programs with 4 threads on it.  (I'd rather create another
>> queue with 4 threads so that they can put it on that queue instead.)
>
> If you submit with `qsub -binding ...`  (man qsub) you will get this feature 
> automatically, and the request could be put in a JSV.
>
> But it's not enforced if the user manipulates the given set of allowed cores 
> on his own.

But with cpuset confinement in place it can't run outside that set.

> And it's only a soft request to SGE, if it can't be fulfilled, it will run 
> anyway.

However, if you don't over-subscribe, and use -binding linear:slots in
recent SGE, you an expect the binding to succeed.

-- 
Community Grid Engine:  http://arc.liv.ac.uk/SGE/
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to