Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2018 03:19:54 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Thomas Munro <munro@ip9.org>
Cc:        freebsd-hackers@freebsd.org, alc@freebsd.org, mjg@freebsd.org
Subject:   Re: PostgresSQL vs super pages
Message-ID:  <20181011001954.GV5335@kib.kiev.ua>
In-Reply-To: <CADLWmXU=7QM-oHmY=TMAQanQE-dnXY4v74Zm1kkEz3Gc=ip21A@mail.gmail.com>
References:  <CADLWmXU=7QM-oHmY=TMAQanQE-dnXY4v74Zm1kkEz3Gc=ip21A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 11, 2018 at 12:59:41PM +1300, Thomas Munro wrote:
> shm_open("/PostgreSQL.1721888107",O_RDWR|O_CREAT|O_EXCL,0600) = 46 (0x2e)
> ftruncate(46,0x400000)                           = 0 (0x0)
Try to write zeroes instead of truncating.
This should activate the fast path in the fault handler, and if the
pages allocated for backing store of the shm object were from reservation,
you should get superpage mapping on the first fault without promotion.

> mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_HASSEMAPHORE|MAP_NOSYNC|MAP_ALIGNED_SUPER,46,0x0)
> = 35081158656 (0x82b000000)
> close(46)                                        = 0 (0x0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181011001954.GV5335>