hydra-queue-runner: Improved scheduling
Each jobset now has a "scheduling share" that determines how much of the build farm's time it is entitled to. For instance, if a jobset has 100 shares and the total number of shares of all jobsets is 1000, it's entitled to 10% of the build farm's time. When there is a free build slot for a given system type, the queue runner will select the jobset that is furthest below its scheduling share over a certain time window (currently, the last day). Withing that jobset, it will pick the build with the highest priority. So meta.schedulingPriority now only determines the order of builds within a jobset, not between jobsets. This makes it much easier to prioritise one jobset over another (e.g. nixpkgs:trunk over nixpkgs:stdenv).
This commit is contained in:
@ -15,6 +15,18 @@ use warnings;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
|
||||
=head1 COMPONENTS LOADED
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L<Hydra::Component::ToJSON>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->load_components("+Hydra::Component::ToJSON");
|
||||
|
||||
=head1 TABLE: C<CachedDarcsInputs>
|
||||
|
||||
=cut
|
||||
@ -28,11 +40,6 @@ __PACKAGE__->table("CachedDarcsInputs");
|
||||
data_type: 'text'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 branch
|
||||
|
||||
data_type: 'text'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 revision
|
||||
|
||||
data_type: 'text'
|
||||
@ -48,6 +55,11 @@ __PACKAGE__->table("CachedDarcsInputs");
|
||||
data_type: 'text'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 revcount
|
||||
|
||||
data_type: 'integer'
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
@ -55,12 +67,12 @@ __PACKAGE__->add_columns(
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"revision",
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"revcount",
|
||||
{ data_type => "integer", is_nullable => 0 },
|
||||
"sha256hash",
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"storepath",
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"revcount",
|
||||
{ data_type => "integer", is_nullable => 0 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
@ -69,8 +81,6 @@ __PACKAGE__->add_columns(
|
||||
|
||||
=item * L</uri>
|
||||
|
||||
=item * L</branch>
|
||||
|
||||
=item * L</revision>
|
||||
|
||||
=back
|
||||
@ -80,7 +90,9 @@ __PACKAGE__->add_columns(
|
||||
__PACKAGE__->set_primary_key("uri", "revision");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fx3yosWMmJ+MnvL/dSWtFA
|
||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-09-20 11:08:50
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yl1slt3SAizijgu0KUTn0A
|
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||
1;
|
||||
|
@ -118,6 +118,12 @@ __PACKAGE__->table("Jobsets");
|
||||
default_value: 300
|
||||
is_nullable: 0
|
||||
|
||||
=head2 schedulingshares
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 100
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
@ -151,6 +157,8 @@ __PACKAGE__->add_columns(
|
||||
{ data_type => "integer", default_value => 3, is_nullable => 0 },
|
||||
"checkinterval",
|
||||
{ data_type => "integer", default_value => 300, is_nullable => 0 },
|
||||
"schedulingshares",
|
||||
{ data_type => "integer", default_value => 100, is_nullable => 0 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
@ -272,7 +280,7 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tsGR8MhZRIUeNwpcVczMUw
|
||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-09-20 12:15:23
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pD6tGW0Ob3fuA1p0uQnBWw
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user