NAME

Schedule::Load::ResourceReq - Generate a request for a single resource

SYNOPSIS

See Schedule::Load::Schedule

DESCRIPTION

This package provides a constructor for a request of a single resource. When scheduling, multiple resource requests may be created and the scheduler will fill (or deny) all requests in one atomic operation. This prevents nasty deadlocks (like the chopsticks deadlock.)

METHODS

new (...)

Create a new object with the parameters specified in the following section.

PARAMETERS

The following parameters are accepted by new(), and are also may be read via accessor methods.

allow_reserved

When set, reserved hosts may be scheduled.

classes

An array reference of which classes the host must support to allow this job to be run on that host. Defaults to [], which allows any host.

favor_host

The hostname to try and choose if all is equal, under the presumption that there are disk access time benefits to doing so. Defaults to the current host.

jobs_running

Current number of jobs the requester is running. This is compared to max_jobs.

match_cb

A string containing a subroutine which will be passed a host reference and should return true if this host has the necessary properties. This will be evaluated in a Safe container, and can do only minimal core functions. For example: match_cb=>"sub{return $_[0]->get_undef('memory')>512;}"

max_jobs

Maximum number of jobs that can be issued if allow_none is specified in a scheduler request. Negative fraction indicates that percentage of the clump, for example -0.5 will use at most 50% of all CPUs. Defaults to 100% of the clump.

rating_cb

A string containing a subroutine which will be passed a host reference and should return a number that is compared against other hosts' ratings to determine the best host for a new job. A return of zero indicates this host may not be used. Ratings closer to zero are better. Defaults to a function that includes the load_limit and the cpu percentage free. Evaluated in a Safe container, and can do only minimal core functions.

SEE ALSO

Schedule::Load, Schedule::Load::Hosts, Schedule::Load::Hosts::Host

DISTRIBUTION

The latest version is available from CPAN.

AUTHORS

Wilson Snyder <wsnyder@wsnyder.org>

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 110:

'=item' outside of any '=over'

Around line 114:

You forgot a '=back' before '=head1'

Around line 162:

Expected text after =item, not a bullet

Around line 164:

Expected text after =item, not a bullet

Around line 166:

Expected text after =item, not a bullet