Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSZzj-00045z-Os for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Jul 2017 02:24:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dSZzi-0003N5-Kp for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Jul 2017 02:24:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dSZyD-0000im-P4 for pgsql-hackers@postgresql.org; Wed, 05 Jul 2017 02:23:13 +0000 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dSZyA-000324-JW for pgsql-hackers@postgresql.org; Wed, 05 Jul 2017 02:23:13 +0000 Received: by mail-pf0-x22e.google.com with SMTP id q85so8602239pfq.1 for ; Tue, 04 Jul 2017 19:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VjdXhxM/knxZTbnh9yxgvNHCHHUKE763rPHY15dmjIg=; b=e6BDKwExIbzUncFHWQhUhC9gYHSxf1eXvcVqyUX2aVXQt4emAQp5kWzZnEnLOuzVQg v6SU7ZlEcOpuycP52PoWRPOYsrOyEmaoCub2hP1aLK7NRv6QTjahs4q+YCf8D5rSUTKZ oC9bt+7hg17I84BPgKo/kTkWjLbnfXqY4izyk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VjdXhxM/knxZTbnh9yxgvNHCHHUKE763rPHY15dmjIg=; b=XtH+s9u5L+9aNUnYVw6QtVdVrTCxU06l7JJAqoEYNm9N2w9Kx22P95KtJpPUaG2fZm 6IxMO01ICwBJJXX6p88Di8xn4oncq/iDgvtGEj7+ZV0uzghW+qnRCl60MDykvqvqT1LP FqbdFuJm+O4pGt8vff5DnopGQi7upDCXaknSDJEqf3VRIoou7+Jv+pIxpokydDTnq2P9 5ngTc0ejsu104WECWMH1qm7azZYC4HG+HpftDhQwclH2fEZbvTDuQFHEwLlvSlFrj3/U /rc94dY/ilSV39VjTsQpCsdf9AB9LK0xYzNwxZxdZJkysfpKLdWQixLo6OfkLBtFaBgM APaQ== X-Gm-Message-State: AIVw111cWa9OI1959VzoknsZvUEiL9JsfGPcjCj58Dq9fk/peLAw8r5l +Xgkz5vhEpq/JLMo X-Received: by 10.99.143.94 with SMTP id r30mr18364968pgn.102.1499221387751; Tue, 04 Jul 2017 19:23:07 -0700 (PDT) Received: from rfd.leadboat.com (c-73-158-248-138.hsd1.ca.comcast.net. [73.158.248.138]) by smtp.gmail.com with ESMTPSA id 63sm43116427pgd.57.2017.07.04.19.23.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 19:23:06 -0700 (PDT) Date: Tue, 4 Jul 2017 19:23:04 -0700 From: Noah Misch To: Tom Lane Cc: pgsql-hackers@postgreSQL.org Subject: Re: Reducing runtime of stats regression test Message-ID: <20170705022304.GA2132910@rfd.leadboat.com> References: <17795.1493869423@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17795.1493869423@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Wed, May 03, 2017 at 11:43:43PM -0400, Tom Lane wrote: > On a reasonably fast development machine, one of the biggest time sinks > while running the core regression tests is the long "sleep" calls in the > stats.sql regression test. I took a closer look at these, and I think > we could basically get rid of them. > > First up is this bit at the beginning of that test script: > > -- wait to let any prior tests finish dumping out stats; > -- else our messages might get lost due to contention > SELECT pg_sleep_for('2 seconds'); > > The stated concern isn't really all that plausible, since even if we > launch a batch of test scripts at once, they don't all finish at once, > so there's unlikely to be a big pileup of traffic to the stats collector. > But we don't have to take that on faith: in assert-enabled builds, > pgstat_send() logs any failure to send a stats message. > > I have grepped the buildfarm logs for "could not send to statistics > collector" log messages during the "make check" stage (a total of 754313 > runs dating back ten years). What I find is that members mereswine and > gull occasionally report "Network is down", and a few times currawong and > thrips have complained "Invalid argument", and there are exactly no other > such messages. In particular there are no EAGAIN or EWOULDBLOCK failures > that would suggest congestion on the stats collector's input. So this > is basically not something that happens at all in the regression tests, > let alone during startup of the stats test in particular. Linux and AIX, at least, do not make send() return an error when dropping a UDP message for lack of queue space. Thus, the lack of buildfarm logs reporting send() failure is inconclusive. Nonetheless, the lack of stats.sql failures since you finished modifying this test in mid-May suggests this was a good change. Besides, if a new member were slow enough to experience a stats pileup, I wouldn't have firm hope that 2s would suffice. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers