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 | DB7PR02MB4663C748E4C5A199FFBD8EFC86680@DB7PR02MB4663.eurprd02.prod.outlook.com Whole thread Raw |
In response to | Shared Memory: How to use SYSV rather than MMAP ? ("REIX, Tony" <tony.reix@atos.net>) |
List | pgsql-hackers |
Hi Thomas,
Thanks for your help,
Here are my experiments on the AIX 7.2 machine.
That sounds good !
About "huge", we have plans for AIX. But it is not urgent. Let's go with this patch.
Regards,
Tony
Buffers for SharedMemory PSIZ has been extended by:
ldedit -btextpsize=64k -bdatapsize=64k -bstackpsize=64k /opt/freeware/bin/postgres_64
1) shm: mmap / huge: try
$PGDATA/postgresql.conf :
shared_memory_type = mmap
huge_pages = try
-[ RECORD 1 ]------+-----
shared_memory_type | mmap
-[ RECORD 1 ]--------------+-----
dynamic_shared_memory_type | mmap
-[ RECORD 1 ]---
huge_pages | try
Procmap :
a00000000000000 a00000008dca000 145192K rw- sm SMMAP 8ce86c
+ grep MAIN /tmp/PG.procmap
100000000 10090c883 9266K r-x m MAINTEXT 8a62ea postgres_64
1100009ea 1100f7500 986K rw- m MAINDATA 836822 postgres_64
+ grep SHM /tmp/PG.procmap
a00010000000000 a00010000010000 64K rw- m SHM 81b5e1 shmid:138413056
2) shm: mmap / huge: on
$PGDATA/postgresql.conf :
shared_memory_type = mmap
huge_pages = on
$ pg_ctl start :
FATAL: huge pages not supported on this platform
3) shm: mmap / huge: try
$PGDATA/postgresql.conf :
shared_memory_type = mmap
huge_pages = try
$ pg_ctl start : OK - No message
4) shm: sysv / huge: off
shared_memory_type = sysv
huge_pages = off
-[ RECORD 1 ]------+-----
shared_memory_type | sysv
-[ RECORD 1 ]--------------+-----
dynamic_shared_memory_type | sysv
-[ RECORD 1 ]---
huge_pages | off
Procmap :
+ grep MAIN /tmp/PG.procmap
100000000 10090c883 9266K r-x m MAINTEXT 886229 postgres_64
1100009ea 1100f7500 986K rw- m MAINDATA 8ee2ce postgres_64
+ grep SHM /tmp/PG.procmap
a00000000000000 a00000008dd0000 145216K rw- m SHM 8745c7 shmid:139461632
a00000010000000 a00000010010000 64K rw- m SHM 80b380 shmid:685769729
$ pg_ctl start : OK - No message
5) shm: sysv / huge: on
FATAL: huge pages not supported on this platform
6) shm: sysv / huge: try
PID=` ps -edf | grep /opt/freeware/bin/postgres | grep " 1" | awk '{print $2}'`
procmap -nfX > /tmp/PG.procmap $PID
grep SMMAP /tmp/PG.procmap
grep MAIN /tmp/PG.procmap
grep SHM /tmp/PG.procmap
SHOW shared_memory_type;
SHOW dynamic_shared_memory_type;
SHOW huge_pages;
Tony Reix
tony.reix@atos.net
ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Envoyé : jeudi 7 février 2019 03:30
À : REIX, Tony
Cc : EMPEREUR-MOT, SYLVIE
Objet : Re: Shared Memory: How to use SYSV rather than MMAP ?
> I've been able to build/install/test the version 11.1 with your patch, on AIX 7.2 .
>
>
> I've changed the postgresql.conf file we use for our benchmark, and I've checked that, when starting postgres, it reads this file.
>
> However, I'm not sure that it takes into account the values that I have set. Or maybe the "postgres --describe-config" command does not do what I am expecting (print the value of all the parameters set in the postgresql.conf file)?
SHOW shared_memory_type;
SHOW dynamic_shared_memory_type;
Maybe you can also see a difference in the output of "procmap" for a
backend process? I am not sure about that.
--
Thomas Munro
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.enterprisedb.com&data=02%7C01%7Ctony.reix%40atos.net%7C1f0898d2c4fe4073023908d68ca45bcc%7C33440fc6b7c7412cbb730e70b0198d5a%7C0%7C0%7C636851034874173812&sdata=Jre8GiJFU%2FobP3K6xsYrV9dOg2nS7%2F7y9J81fDqTwJg%3D&reserved=0
pgsql-hackers by date: