All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 21/21] starvation: Better logging/debugging output
Date: Thu, 18 Apr 2019 17:31:58 +0100	[thread overview]
Message-ID: <20190418163158.11408-22-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com>

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-hosts-allocate-Executive | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index b75927c1..64c4c9f9 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -777,8 +777,8 @@ sub most_optimistic ($$$) {
     return $optimist->{Got};
 }
 
-sub starving ($) {
-    my ($best_start_abs) = @_;
+sub starving ($$) {
+    my ($best_start_abs, $now) = @_;
     return (0, 'runvar says never give up') unless %$starvation_p;
     return (0, 'no estimate') unless defined $best_start_abs;
     $starvation_q->execute($flight);
@@ -801,11 +801,16 @@ sub starving ($) {
     # to our expected finish is more than the total time so
     # far (for the completed jobs) by the margin X and I
     my $X = hostalloc_starvation_calculate_X($starvation_p, $w, $d);
-    return (0, 'X=inf') unless defined $X;
+    return (0, "D=$d W=$w X=inf") unless defined $X;
     my $total_d = $maxfin - $fi->{started};
     my $projected_me = $best_start_abs - $fi->{started};
-    my $m = "D=$d W=$w X=$X maxfin=$maxfin";
-    my $bad = $projected_me > $X * $total_d + $starvation_p->{I};
+    my $lim = $X * $total_d + $starvation_p->{I};
+    my $Xcmp = ($projected_me - $starvation_p->{I}) / $total_d;
+    my $m = sprintf
+	"D=%d W=%d X=%.3f t_D=%s t_me=%s t_lim=%.3f X'=%.4f (fi.s=%s)",
+	$d, $w, $X, $total_d, $projected_me, $lim, $Xcmp,
+	$fi->{started} - $now;
+    my $bad = $projected_me > $lim;
     return ($bad, $m);
 }
 
@@ -876,7 +881,7 @@ sub attempt_allocation {
 	    }
 	} elsif (%$starvation_p) {
 	    my $est_abs = most_optimistic($best, $now, $starvation_p->{I});
-	    my ($starving, $m) = starving($est_abs);
+	    my ($starving, $m) = starving($est_abs, $now);
 	    $starvation_q->finish();
 	    if (!$starving) {
 		print DEBUG "not starving: $m\n";
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [Xen-devel] [OSSTEST PATCH 21/21] starvation: Better logging/debugging output
Date: Thu, 18 Apr 2019 17:31:58 +0100	[thread overview]
Message-ID: <20190418163158.11408-22-ian.jackson@eu.citrix.com> (raw)
Message-ID: <20190418163158.aM4fPoNN3aHIBBsJbp6vg_iljMyjR53DSreL19TeeoQ@z> (raw)
In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com>

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-hosts-allocate-Executive | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index b75927c1..64c4c9f9 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -777,8 +777,8 @@ sub most_optimistic ($$$) {
     return $optimist->{Got};
 }
 
-sub starving ($) {
-    my ($best_start_abs) = @_;
+sub starving ($$) {
+    my ($best_start_abs, $now) = @_;
     return (0, 'runvar says never give up') unless %$starvation_p;
     return (0, 'no estimate') unless defined $best_start_abs;
     $starvation_q->execute($flight);
@@ -801,11 +801,16 @@ sub starving ($) {
     # to our expected finish is more than the total time so
     # far (for the completed jobs) by the margin X and I
     my $X = hostalloc_starvation_calculate_X($starvation_p, $w, $d);
-    return (0, 'X=inf') unless defined $X;
+    return (0, "D=$d W=$w X=inf") unless defined $X;
     my $total_d = $maxfin - $fi->{started};
     my $projected_me = $best_start_abs - $fi->{started};
-    my $m = "D=$d W=$w X=$X maxfin=$maxfin";
-    my $bad = $projected_me > $X * $total_d + $starvation_p->{I};
+    my $lim = $X * $total_d + $starvation_p->{I};
+    my $Xcmp = ($projected_me - $starvation_p->{I}) / $total_d;
+    my $m = sprintf
+	"D=%d W=%d X=%.3f t_D=%s t_me=%s t_lim=%.3f X'=%.4f (fi.s=%s)",
+	$d, $w, $X, $total_d, $projected_me, $lim, $Xcmp,
+	$fi->{started} - $now;
+    my $bad = $projected_me > $lim;
     return ($bad, $m);
 }
 
@@ -876,7 +881,7 @@ sub attempt_allocation {
 	    }
 	} elsif (%$starvation_p) {
 	    my $est_abs = most_optimistic($best, $now, $starvation_p->{I});
-	    my ($starving, $m) = starving($est_abs);
+	    my ($starving, $m) = starving($est_abs, $now);
 	    $starvation_q->finish();
 	    if (!$starving) {
 		print DEBUG "not starving: $m\n";
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-04-18 16:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 16:31 [OSSTEST PATCH 00/21] Abandon jobs which are unreasonably delaying their flight Ian Jackson
2019-04-18 16:31 ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 01/21] ts-hosts-allocate-Executive: with -U, just append to the same logfile Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 02/21] selecthost: Honour new $none_ok optional parameter Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 03/21] ts-logs-capture: Do not try to capture logs of hosts not allocated Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 04/21] alloc_resources: Support special abandonment values Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 05/21] starvation: Teach sg-report-flight about starved step state Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 06/21] starvation: Teach archaeologists about starved job state Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 07/21] starvation: Teach ms-flights-summary about job state starved Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 08/21] starvation: Teach sg-execute-flight " Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 09/21] step handling: Preserve step states set by ts-* scripts Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 10/21] TestSupport: Make "broken" print the actual job state Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 11/21] JobDB::Executive: step_*: fix log messages to talk about "steps" Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 12/21] starvation: Permit step_finish to set the state `starved' Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 13/21] TestSupport: Make "broken" set the step state too Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 14/21] tcl/JobDB-Executive: Do not squash "starved" status Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 15/21] starvation: Propagate starved job status into dependent jobs Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 16/21] ts-host-allocate-Executive: Break out $now and add a newline Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 17/21] starvation: Use "starved" for hostalloc_maxwait_max Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 18/21] starvation: Infrastructure for jobs which are delaying their flights Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 19/21] starvation: Abandon jobs which are unreasonably delaying their flight Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` [OSSTEST PATCH 20/21] hostalloc_maxwait_max: Use starvation most_optimistic Ian Jackson
2019-04-18 16:31   ` [Xen-devel] " Ian Jackson
2019-04-18 16:31 ` Ian Jackson [this message]
2019-04-18 16:31   ` [Xen-devel] [OSSTEST PATCH 21/21] starvation: Better logging/debugging output Ian Jackson
2019-04-26 21:16 ` [OSSTEST PATCH 00/21] Abandon jobs which are unreasonably delaying their flight Julien Grall
2019-04-26 21:16   ` [Xen-devel] " Julien Grall
2019-04-29 14:46   ` Ian Jackson
2019-04-29 14:46     ` [Xen-devel] " Ian Jackson
2019-04-30 14:26     ` Julien Grall
2019-04-30 14:26       ` [Xen-devel] " Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190418163158.11408-22-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.