[master] 419304a Stagger ramp-up to avoid large -j from becoming thundering herd

Poul-Henning Kamp phk at varnish-cache.org
Mon Oct 22 08:16:56 CEST 2012


commit 419304a9f07f1d8cad956744614a342b08955a54
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 22 06:16:20 2012 +0000

    Stagger ramp-up to avoid large -j from becoming thundering herd

diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index fb1c42e..04aba0d 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -405,6 +405,9 @@ main(int argc, char * const *argv)
 		if (!VTAILQ_EMPTY(&tst_head) && njob < npar) {
 			start_test();
 			njob++;
+			/* Stagger ramp-up */
+			if (njob < npar)
+				(void)usleep(random() % 100000L);
 			i = 1;
 			continue;
 		}



More information about the varnish-commit mailing list