Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id ECF259FBDB6 for ; Thu, 5 Jul 2007 23:58:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65593-05 for ; Thu, 5 Jul 2007 23:58:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp109.plus.mail.re1.yahoo.com (smtp109.plus.mail.re1.yahoo.com [69.147.102.72]) by postgresql.org (Postfix) with SMTP id ED32E9FBA36 for ; Thu, 5 Jul 2007 23:58:39 -0300 (ADT) Received: (qmail 79627 invoked from network); 6 Jul 2007 02:58:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=Yahoo.com; h=Received:X-YMail-OSG:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=onKBUZ2zUP36yWXBU/swLzco6N5j7Iz51xaofCw637b4UCcN6Ar8zg2ThDPtdvgJDWAVeg9BMApmnWPeKt9wnO4i7Ut+PVslMhqRxUA+OL7OCdOF031MAmOGisTYmIR6yYkKRYejx/4ksFGJvowPUITmE+Bdit3a60T7qfkqJZo= ; Received: from unknown (HELO jupiter.jannicash.info) (janwieck@68.34.254.79 with login) by smtp109.plus.mail.re1.yahoo.com with SMTP; 6 Jul 2007 02:58:37 -0000 X-YMail-OSG: scfNAJQVM1lNhGRgYLRMxBQdi7YARdF2ZBNs6rvwb2vGpfb_dOdL6Tlm3n_VFYm8pQpfr2kSIA-- Received: from [172.21.8.128] (mars.jannicash.info [192.168.192.101]) (authenticated bits=0) by jupiter.jannicash.info (8.12.10/8.12.9) with ESMTP id l662wWHY004685; Thu, 5 Jul 2007 22:58:32 -0400 (EDT) (envelope-from JanWieck@Yahoo.com) Message-ID: <468DAFD5.30002@Yahoo.com> Date: Thu, 05 Jul 2007 22:58:29 -0400 From: Jan Wieck User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Tom Lane CC: PostgreSQL Development Subject: Re: usleep feature for pgbench References: <468D42B3.4010701@Yahoo.com> <20905.1183664046@sss.pgh.pa.us> <468D57F3.7030405@Yahoo.com> <21985.1183671014@sss.pgh.pa.us> In-Reply-To: <21985.1183671014@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.775 tagged_above=0 required=5 tests=AWL=-1.530, BAYES_40=-0.185, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135 X-Spam-Level: * X-Archive-Number: 200707/152 X-Sequence-Number: 105067 On 7/5/2007 5:30 PM, Tom Lane wrote: > Jan Wieck writes: >> I think I've coded it in a way that if one doesn't use the \usleep >> command at all, it will never even call gettimeofday() and use a NULL >> timeout in select() as it used to. > > Did you check that the observed performance for non-usleep-using scripts > didn't change? If this extra overhead causes a reduction in reported > TPS rates it would make it hard to compare older and newer tests. Given pgbench's unpredictability of results ... lets see. I ran dropdb x createdb x pgbench -i -s10 x psql -c 'checkpoint' x sleep 1 psql -c 'checkpoint' x pgbench -s10 -c5 -t10000 x pgbench -s10 -c5 -t10000 x pgbench -s10 -c5 -t10000 x Original pgbench reported 39, 37 and 33 TPS. Having my patch applied it reported 40, 38 and 33 TPS. Inserting a "\usleep 1" after the update to accounts of a default equivalent script changed those numbers to 40, 37 and 33. I interpret that as "does not change observed performance". > > Other than that I've got no objection to it. Will be committed after adjusting the README. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #