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

RE: [Condor-users] Default User priority factor

> Hi folks,
> We'd like to manage effective user priority based on how much 
> a research group contributes to the resources in a condor pool.
> As such, we need to be able to increase the effective 
> priority on a per user basis, raising certain user's 
> priorities about the rest.
> To do this, ideally we would want to the default user 
> priority factor to be something like 100, and lower this in 
> proportion to the resources that a user (or user's group) 
> brings to the table.
> At this point, the default user factor is set to 1.0, and 
> can't go any lower, which means we've bottomed out in being 
> able to raise a certain user's priority over the default.
> I s there a way to set the default user priority factor? 
> We've set the NICE_USER_PRIO_FACTOR to 10, but this only 
> affects users who choose to nice themselves in the submit 
> scripts, and so doesn't allow for enforcement of such a policy.


I use a script, running every 5 minutes as a cron job on my Linux
machine that is the negotiator and collector for my site. It rearranges
the user priorities so that the user with the highest priority queued
job has the lowest priority, and gets the most number of machines on the
next negotiation cycle. It has to do with our preference for a pure
priority-based allotment method instead of a fairshare allotment method
(such are the ways of the corporate world).

The script spreads out adjacent priorities by a configurable amount. The
higher the spread the more resources are assigned to your highest
priority user based on condor's ratio-allocation. So if you want your
highest priority users (however you define priority) to have many, many
machines you'd want the spread to be high. So the next highest priority
user ends up with an EUP that's far away.

The code is organized like this:

	foreach user with idle jobs {
		get the priority for this job {
			save priority for this user if it's the highest
                  have seen for this user
	priority = 0.5
	spread = 5.0
      foreach sort_on_priority(user with priority we saved) {
            call condor_userprio -setprio $user $priority
	 	priority = $priority + $spread

Of course, you can adapt that to your language of choice and sorting
preferences. Hope that helps.

- Ian