Shared Memory: How to use SYSV rather than MMAP ?

From: "REIX, Tony" <tony(dot)reix(at)atos(dot)net>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: "EMPEREUR-MOT, SYLVIE" <sylvie(dot)empereur-mot(at)atos(dot)net>
Subject: Shared Memory: How to use SYSV rather than MMAP ?
Date: 2018-11-20 10:11:30
Message-ID: HE1PR0202MB28126DB4E0B6621CC6A1A91286D90@HE1PR0202MB2812.eurprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On AIX, since with MMAP we have only 4K pages though we can have 64K pages with SYSV, we'd like to experiment with SYSV rather than MMAP and measure the impact to the performance.

Looking at file: src/include/storage/dsm_impl.h , it seemed to me that replacing the line:

#define DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE DSM_IMPL_POSIX
by the line:
#define DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE DSM_IMPL_SYSV

was the right thing to do. Plus some changes like:

export LDR_CNTRL=SHMPSIZE=64K

ldedit -btextpsize=64k -bdatapsize=64k -bstackpsize=64k ...../postgres

However, when looking at details by means of procmap tool, it is unclear if that worked or not.

Maybe I was lost by the variables:

HAVE_SHM_OPEN . USE_DSM_POSIX . USE_DSM_SYSV . USE_DSM_MMAP

which are all defined.

So, what should I do in order to use SYSV rather than MMAP for the Shared Memory ?

(PostgreSQL v11.1)

Thanks/Regards,

Cordialement,

Tony Reix

tony(dot)reix(at)atos(dot)net

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.&URL=http%3a%2f%2fwww.atos.net%2f>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message s.cherkashin 2018-11-20 10:14:47 Re: Psql patch to show access methods info
Previous Message 066ce286 2018-11-20 10:09:31 mysql_fdw crash