Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B14191336FA7 for ; Fri, 21 Jan 2011 16:27:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 78003-05 for ; Fri, 21 Jan 2011 20:27:00 +0000 (UTC) Received: from amadensor.com (amadensor.com [200.46.208.228]) by mail.postgresql.org (Postfix) with ESMTP id 77F961337B4A for ; Fri, 21 Jan 2011 16:27:00 -0400 (AST) Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by amadensor.com (Postfix) with ESMTP id 4B9FB18A4521 for ; Fri, 21 Jan 2011 20:27:00 +0000 (UTC) Received: from amadensor.com ([200.46.208.228]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 51447-04; Fri, 21 Jan 2011 20:26:53 +0000 (UTC) Received: from dbms (unknown [76.76.81.70]) by amadensor.com (Postfix) with ESMTPA id 2D03218A4776; Fri, 21 Jan 2011 20:26:52 +0000 (UTC) Received: from dbms ([127.0.0.1] helo=grant.boldlygoingnowhere.org ident=www-data) by dbms with esmtp (Exim 4.69) (envelope-from ) id 1PgNVq-0003jZ-LE; Fri, 21 Jan 2011 13:23:15 -0700 Received: from 159.238.13.4 (SquirrelMail authenticated user grant) by grant.boldlygoingnowhere.org with HTTP; Fri, 21 Jan 2011 13:23:15 -0700 (MST) Message-ID: <6db0dcf63cdcbdce27f8f941de3e623d.squirrel@grant.boldlygoingnowhere.org> In-Reply-To: <17636.1295639447@sss.pgh.pa.us> References: <17636.1295639447@sss.pgh.pa.us> Date: Fri, 21 Jan 2011 13:23:15 -0700 (MST) Subject: Re: Fun little performance IMPROVEMENT... From: grant@amadensor.com To: "Tom Lane" Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/208 X-Sequence-Number: 41995 > grant@amadensor.com writes: >> Here is the fun part. When running 8 threads spinning calculating >> square >> roots (using the stress package), the full scan returned consistently >> 60% >> faster than the machine with no load. > > Possibly the synchronized-seqscans logic kicking in, resulting in this > guy not having to do all his own I/Os. It would be difficult to make > any trustworthy conclusions about performance in such cases from a view > of only one process's results --- you'd need to look at the aggregate > behavior to understand what's happening. > > regards, tom lane > My though was that either: 1) It was preventing some other I/O or memory intensive process from happening, opening the resources up. 2) It was keeping the machine busy from the hypervisor's point of view, preventing it from waiting for a slot on the host machine. 3) The square roots happen quickly, resulting in more yields, and therefore more time slices for my process than if the system was in its idle loop. Any way you look at it, it is fun and interesting that a load can make something unrelated happen more quickly. I will continue to try to find out why it is the case.