Re: Shared Memory: How to use SYSV rather than MMAP ? - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Shared Memory: How to use SYSV rather than MMAP ?
Date
Msg-id CAEepm=0R7jC34gaJmU0OW3VsMon5pAO5PADmqrrVw7fdNgBYnQ@mail.gmail.com
Whole thread Raw
In response to RE: Shared Memory: How to use SYSV rather than MMAP ?  ("REIX, Tony" <tony.reix@atos.net>)
Responses Re: Shared Memory: How to use SYSV rather than MMAP ?
List pgsql-hackers
On Wed, Nov 21, 2018 at 4:37 AM REIX, Tony <tony.reix@atos.net> wrote:
> YES ! Reading this file, your suggestion should work ! Thx !
>
> I've rebuilt and run the basic tests. We'll relaunch our tests asap.

I would be surprised if that makes a difference:
anonymous-mmap-then-fork and SysV shm are just two different ways to
exchange mappings between processes, but I'd expect the virtual memory
object itself to be basically the same, in terms of constraints that
might affect page size at least.

If you were talking about mmap backed by a file (which is what you get
for temporary parallel query segments if you tell it to use
dynamic_shared_memory_type = mmap), that might be a different matter,
because then the block size of the file system backing it might come
into the picture and limit the kernel's options.  For example, that is
why (with default settings) Parallel Hash can't use large pages on
Linux (because Linux's POSIX shm_open() really just opens files on
/dev/shm, which has a 4k block size), but can use them on FreeBSD
(because its shm_open() isn't bound to page sizes, it can and
sometimes decides to use large pages).

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC] Removing "magic" oids
Next
From: Andres Freund
Date:
Subject: Re: Shared Memory: How to use SYSV rather than MMAP ?