Re: Consecutive Query Executions with Increasing Execution Time

From: Shijia Wei <shijiawei(at)utexas(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Consecutive Query Executions with Increasing Execution Time
Date: 2019-12-20 05:21:10
Message-ID: CABSfb-5G3GDgH5zYEg5mW1WNC-ncV1+420=BriKTtpL9a9SxpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi everyone!

Thanks a ton for this brilliant discussion here!
It turned out that Nicolas was correct! I found that the CPU was broken and
not spinning at all.
With consecutive parallel query execution, the CPU temperature hits 100C
almost immediately after 1 or 2 iterations.
So the processor starts throttling way below baseline clk frequency to
something like 1.2G or even 1G.

I waited until the new Fan came to report back, and now this weird behavior
went away.

Thanks,
Shijia

On Wed, Dec 18, 2019 at 7:44 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> > On Tue, 2019-12-17 at 11:11 -0500, Jeff Janes wrote:
> >> If it is doing a seq scan (I don't know if it is) they intentionally
> use a
> >> small ring buffer to, so they evict their own recently used blocks,
> rather
> >> than evicting other people's blocks. So these blocks won't build up in
> >> shared_buffers very rapidly just on the basis of repeated seq scans.
>
> > Sure, but according to the execution plans it is doing a Parallel Index
> Only Scan.
>
> Nonetheless, the presented test case consists of repeatedly doing
> the same query, in a fresh session each time. If there's not other
> activity then this should reach some sort of steady state. The
> table is apparently fairly large, so I don't find it surprising
> that the steady state fails to be 100% cached.
>
> regards, tom lane
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2019-12-20 18:03:29 How to set parallel_tuple_cost
Previous Message Osahon Oduware 2019-12-18 20:25:54 Re: How to prevent POSTGRES killing linux system from accepting too much inserts?