= Prioritizing jobs in a multi-user project = By default, BOINC processes jobs in a roughly first-in, first-out order. If your project has multiple job submitters, this is probably not what you want: users who submits lots of jobs would get more than their share of the project's capacity. BOINC has a set of mechanisms that address this issue. To use them, do the following: == Set the desired quotas for job submitters == Create a user account for each job submitter, and [MultiUser set their quotas]. == Modify your job submission scripts or work generators == Wherever you create jobs - e.g. [RemoteJobs web scripts for remote job submission] and [WorkGeneration work generators] - you must set the priority of the jobs as follows: * Compute the total FLOP estimate (workunit.rsc_fpops_est) of the set of jobs. * Run '''adjust_user_priority''' to update and return the priority of the submitter: {{{ adjust_user_priority --user userID --flops X --app appname }}} For example, in PHP: {{{ $cmd = "cd ../../bin; ./adjust_user_priority --user $user->id --flops $flops --app $app->name"; $x = system($cmd); if (!is_numeric($x) || (double)$x == 0) { ... handle error } $priority = (double)$x; }}} * Set job priorities. For example, use the '''--priority''' option to '''create_work'''. Also, if you're creating a batch, set batch.logical_end_time to the priority (this is not used for scheduling, but is used in displaying batches on the web). == Prioritize existing jobs == If you have a lot of jobs already queued, you can prioritize them (and initialize user priorities) by running {{{ html/ops/submit_init_priority.php }}} This script can also be used to reset all priorities to zero. == Use the right feeder options == Run the feeder with the '''--priority_asc''' option. Notes: * Currently this can't be used in combination with the --all_apps option, or with homogeneous redundancy. * If there are any problems, remove the '''--priority_asc''' option and you'll be using FIFO again.