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

From REIX, Tony
Subject RE: Shared Memory: How to use SYSV rather than MMAP ?
Date
Msg-id HE1PR0202MB28123B79776F63CBEAC2F9D686D70@HE1PR0202MB2812.eurprd02.prod.outlook.com
Whole thread Raw
In response to Re: Shared Memory: How to use SYSV rather than MMAP ?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses RE: Shared Memory: How to use SYSV rather than MMAP ?  ("REIX, Tony" <tony.reix@atos.net>)
List pgsql-hackers

Hi Thomas,


You said:


I think we should respect the huge_pages GUC, as we do on Linux and
Windows (since there are downsides to using large pages, maybe not
everyone would want that).  It could even be useful to allow different
page sizes to be requested by GUC (I see that DB2 has an option to use
16GB pages -- yikes).  It also seems like a good idea to have a
shared_memory_type GUC as Andres proposed (see his link), instead of
using a compile time option.  I guess it was made a compile time
option because nobody could imagine wanting to go back to SysV shm!
(I'm still kinda surprised that MAP_ANONYMOUS memory can't be coaxed
into large pages by environment variables or loader controls, since
apparently other things like data segments etc apparently can, though
I can't find any text that says that's the case and I have no AIX
system).


I guess that you are talking about CPP & C variables:  
  #ifndef MAP_HUGETLB
  HUGE_PAGES_ON
  HUGE_PAGES_TRY)
in addition to : huge_pages = .... in postgresql.conf file.

For now, these variables for Huge Pages are used only for MMAP.
About SysV shared memory, as far as I know, shmget() options for AIX and Linux are different.
Moreover, AIX also provides Large Pages (16MB).

About Andres proposal, I've read his link. However, the patch he proposed:       
is no more available (Attachment not found).

I confirm that I got the SysV Shared Memory by means of a "compile time option".

About "still kinda surprised that MAP_ANONYMOUS memory can't be coaxed
into large pages by environment variables or loader controls
" I confirm that,
on AIX, only 4K pages are available for mmap().

I do agree that options in the postgresql.conf file would be the best solution,
since the code for SysV shared memory and MMAP shared memory seems always present.

Regards,

Tony

pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Covering GiST indexes
Next
From: Lætitia Avrot
Date:
Subject: Re: Constraint documentation