pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pb with big volumes
Date: Fri, 11 Aug 2023 09:27:11 -0500
Message-ID: <7fad2860-2eff-d3b4-7797-c6d5821e0f01@gmail.com> (raw)
In-Reply-To: <CAApHDvoApBdOLyRp+fj3_bcSJeYbJg_R0RdBiY__5TJ8j8Zf5w@mail.gmail.com>
References: <CADX_1aYU=XF1rzmq-YA244pBQtCsDYcYXs0KNzbkZ7M0A8YTCw@mail.gmail.com>
	<CA+s62-P=_NCCm1c=D8bp3vBk4+y+OXYQcvXhUjYkzY_SGiDtQQ@mail.gmail.com>
	<72a34a05-47cb-1635-e56a-79d1f7082094@gmail.com>
	<CAApHDvoApBdOLyRp+fj3_bcSJeYbJg_R0RdBiY__5TJ8j8Zf5w@mail.gmail.com>

On 8/10/23 23:40, David Rowley wrote:
> On Fri, 11 Aug 2023 at 13:54, Ron <ronljohnsonjr@gmail.com> wrote:
>> Wouldn't IO contention make for additive timings instead of exponential?
> No, not necessarily. Imagine one query running that's doing a
> parameterised nested loop join resulting in the index on the inner
> side being descended several, say, million times.  Let's say there's
> *just* enough RAM/shared buffers so that the index pages, once the
> index is scanned the first time, all the required pages are cached
> which results in no I/O on subsequent index scans.  Now, imagine
> another similar query but with another index, let's say this index
> also *just* fits in cache.  Now, when these two queries run
> concurrently, they each evict buffers the other one uses.  Of course,
> the shared buffers code is written in such a way as to try and evict
> lesser used buffers first, but if they're all used about the same
> amount, then this can stuff occur.  The slowdown isn't linear.

But that's cache thrashing (which was OP's concern), not IO contention.


-- 
Born in Arizona, moved to Babylonia.





view thread (9+ messages)  latest in thread

Message-ID: <7fad2860-2eff-d3b4-7797-c6d5821e0f01@gmail.com>
Permalink:  ../7fad2860-2eff-d3b4-7797-c6d5821e0f01@gmail.com/
Also on:    postgresql.org/message-id/7fad2860-2eff-d3b4-7797-c6d5821e0f01@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: pb with big volumes
  In-Reply-To: <7fad2860-2eff-d3b4-7797-c6d5821e0f01@gmail.com>
  References: <CADX_1aYU=XF1rzmq-YA244pBQtCsDYcYXs0KNzbkZ7M0A8YTCw@mail.gmail.com> <CA+s62-P=_NCCm1c=D8bp3vBk4+y+OXYQcvXhUjYkzY_SGiDtQQ@mail.gmail.com> <72a34a05-47cb-1635-e56a-79d1f7082094@gmail.com> <CAApHDvoApBdOLyRp+fj3_bcSJeYbJg_R0RdBiY__5TJ8j8Zf5w@mail.gmail.com> <7fad2860-2eff-d3b4-7797-c6d5821e0f01@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox