PostgresSQL vs super pages

Konstantin Belousov kostikbel at gmail.com
Thu Oct 11 00:20:06 UTC 2018


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)


More information about the freebsd-hackers mailing list