Re: Fun little performance IMPROVEMENT...

From: Scott Carey <scott(at)richrelevance(dot)com>
To: "grant(at)amadensor(dot)com" <grant(at)amadensor(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Fun little performance IMPROVEMENT...
Date: 2011-01-21 21:10:50
Message-ID: C95F3502.1B8D9%scott@richrelevance.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 1/21/11 12:23 PM, "grant(at)amadensor(dot)com" <grant(at)amadensor(dot)com> wrote:

>> grant(at)amadensor(dot)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.

My guess is its something hypervisor related. If this happened on direct
hardware I'd be more surprised. Hypervisors have all sorts of stuff going
on, like throttling the number of CPU cycles a vm gets. In your idle
case, your VM might effectively occupy 1Ghz of a CPU, but 2Ghz in the
loaded case.

>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.
>
>
>
>--
>Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-performance

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message grant 2011-01-21 21:24:47 Re: Fun little performance IMPROVEMENT...
Previous Message grant 2011-01-21 20:23:15 Re: Fun little performance IMPROVEMENT...