RE: Shared Memory: How to use SYSV rather than MMAP ?

Поиск
Список
Период
Сортировка
От REIX, Tony
Тема RE: Shared Memory: How to use SYSV rather than MMAP ?
Дата
Msg-id AM4PR0202MB280260DDBF90323F2A0B2E2F86D40@AM4PR0202MB2802.eurprd02.prod.outlook.com
обсуждение исходный текст
Ответ на RE: Shared Memory: How to use SYSV rather than MMAP ?  ("REIX, Tony" <tony.reix@atos.net>)
Ответы Re: Shared Memory: How to use SYSV rather than MMAP ?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers

Hi Andres, Thomas,


Here is a patch for enabling SystemV Shared Memory on AIX, for 64K or bigger page size, rather than using MMAP shared memory, which is slower on AIX.


We have tested this code with 64K pages and pgbench, on AIX 7.2 TL2 Power 9, and it provided a maximum of +37% improvement.


We'll test this code with Large Pages (SHM_LGPAGE | SHM_PIN | S_IRUSR | S_IWUSR flags of shmget() ) ASAP.


However, I wanted first to get your comments about this change in order to improve it for acceptance.


Thanks/Regards,


Cordialement,

Tony Reix

tony.reix@atos.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

De : REIX, Tony
Envoyé : mercredi 21 novembre 2018 09:45:12
À : Thomas Munro; Andres Freund
Cc : Robert Haas; Pg Hackers; EMPEREUR-MOT, SYLVIE; BERGAMINI, DAMIEN
Objet : RE: Shared Memory: How to use SYSV rather than MMAP ?
 

Hi Thomas, Andres,


I still have to reread/study in depth the discussion in this thread in order to understand all these information. However, we've already got a very good performance improvement of pgbench on AIX 7.2 / Power9 with that change: + ~38% in best case. See below for the details.


This +38% improvement has been measured by comparison with a PostgreSQL v11.1 code which was built with: XLC -O2 + power9-tuning, plus some changes about inlining for AIX and some fixes dealing with issues with XLC and PostgreSQL #ifdef. Maybe GCC provides better results, we'll know later.


Once we are done with this performance analysis campaign, I'll have to submit patches.

Meanwhile, if anyone has ideas about where the choices made for PostgreSQL on Linux may have an impact to the performance on AIX, I'm very interested!


Regards,


Tony



Changes in PostgreSQL11.1 sources for SYSV large pages (64K) support :
  • Main shared memory segment in sysv_shmem.c
removal of #define USE_ANONYMOUS_SHMEM
  • Dynamic shared memory implementations in src/include/storage/dsm_impl.h :
#define USE_DSM_POSIX
//      #define DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE              DSM_IMPL_POSIX

#define DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE              DSM_IMPL_SYSV
#endif
 
·         Changes in PostgreSQL11.1 XCOFF binary with ledit :
  • ldedit -btextpsize=64K -bdatapsize=64K -bstackpsize=64K /opt/freeware/bin/postgres_64
  • Env variable LDR_CNTRL=SHMPSIZE=64K


Cordialement,

Tony Reix

tony.reix@atos.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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Erik Rijkers
Дата:
Сообщение: prewarm compiler warnings
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: prewarm compiler warnings