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

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "REIX, Tony" <tony(dot)reix(at)atos(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, "EMPEREUR-MOT, SYLVIE" <sylvie(dot)empereur-mot(at)atos(dot)net>
Subject: Re: Shared Memory: How to use SYSV rather than MMAP ?
Date: 2018-12-26 23:53:24
Message-ID: CAEepm=0q7MNH7aKOG-Qbv87y7mB6NLF0cLXiz6=fY1V5p_NXYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 27, 2018 at 8:59 AM Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> ... So far I can't reproduce the effect here, probably due to
> lack of cores and probably also various changes that have been made
> (but not the main ones described in that report, apparently).

I decided to blow today's coffee money on a couple of hours on a 40
CPU m4.x10large at the Amazon arcade, running "FreeBSD
12.0-RELEASE-amd64-f5af2713-6d84-41f0-95ea-2eaee78f2af4-ami-03b0f822e17669866.4
(ami-0ec55ef66da2c9765)" on a 20GB SSD with UFS. Some time when there
isn't a commitfest looming I'll try to do some proper testing, but in
a quick and dirty smoke test (-s 600, -S -T 60, shared_buffers=6GB,
for a range of client counts), mmap and sysv were the same, but there
did seem to be a measurable speed-up available at high client counts
with kern.ipc.shm_use_phys=1 and thus for sysv only, for people
prepared to set 3 sysctls and this proposed new GUC. Maybe the effect
would be greater with bigger shared_buffers or smaller pages (this
test ran on super pages)? More work required to figure that out.

Graph attached.

clients mmap sysv sysv+ph
======= ======= ======= =======
1 13341 13277 13600
3 39262 39431 39504
6 78456 78702 78717
9 116281 116356 116349
12 149433 149284 149361
15 169096 169224 169903
18 177632 177774 178177
24 202376 202574 203843
32 227606 229967 231142
48 291641 292431 302510
64 287625 287118 298857
80 277412 278449 293781

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

Attachment Content-Type Size
image/png 6.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2018-12-27 00:26:36 RE: removal of dangling temp tables
Previous Message Alvaro Herrera 2018-12-26 23:51:56 Re: removal of dangling temp tables