public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Hannu Krosing <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Jonathan S. Katz <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Let's make PostgreSQL multi-threaded
Date: Thu, 8 Jun 2023 11:41:00 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMT0RQTCFec0J4hQDcpC0CZ4F-7VWFZXpREgaRU-96bVQ1pj2Q@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAMT0RQTAFrx5xVJ9SXyjP71=SmU+U9+4dDm+XEZWWoy6pbCF5g@mail.gmail.com>
	<CAEze2Whojjh++1Ybw8ohxo46DPeDS4aD5dkPsOse4Q-8r56awQ@mail.gmail.com>
	<CAMT0RQSfoUCNskuweVBhmEiWh76q+eqDhX+5_bWpq8Qq-KuTTg@mail.gmail.com>
	<CA+TgmoZhySzy4QuupAMCi3Fs7ZDwwKkUE9VEgxF2nn71Bo-FXQ@mail.gmail.com>
	<CAMT0RQTCFec0J4hQDcpC0CZ4F-7VWFZXpREgaRU-96bVQ1pj2Q@mail.gmail.com>

Hi,

On 2023-06-08 17:02:08 +0200, Hannu Krosing wrote:
> On Thu, Jun 8, 2023 at 4:56 PM Robert Haas <[email protected]> wrote:
> >
> > On Thu, Jun 8, 2023 at 8:44 AM Hannu Krosing <[email protected]> wrote:
> > > > That sounds like a bad idea, dynamic shared memory is more expensive
> > > > to maintain than our static shared memory systems, not in the least
> > > > because DSM is not guaranteed to share the same addresses in each
> > > > process' address space.
> > >
> > > Then this too needs to be fixed
> >
> > Honestly, I'm struggling to respond to this non-sarcastically. I mean,
> > I was the one who implemented DSM. Do you think it works the way that
> > it works because I considered doing something smart and decided to do
> > something dumb instead?
>
> No, I meant that this needs to be fixed at OS level, by being able to
> use the same mapping.
>
> We should not shy away from asking the OS people for adding the useful
> features still missing.

There's a large part of this that is about hardware, not software. And
honestly, for most of the problems the answer is to just use threads. Adding
complexity to operating systems to make odd architectures like postgres'
better is a pretty dubious proposition.

I don't think we have even remotely enough influence on CPU design to make
e.g. *partial* TLB sharing across processes a thing.


> It was mentioned in the Unconference Kernel Hacker AMA talk and said
> kernel hacker works for Oracle, andf they also seemed to be needing
> this :)

The proposals around that don't really help us all that much. Sharing the page
table will be a bit more efficient, but it won't really change anything
dramatically.  From what I understand they are primarily interested in
changing properties of a memory mapping across multiple processes, e.g. making
some memory executable and have that reflected in all processes. I don't think
this will help us much.

Greetings,

Andres Freund






view thread (43+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Let's make PostgreSQL multi-threaded
  In-Reply-To: <[email protected]>

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

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