pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: okano.naoki@jp.fujitsu.com
Subject: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Date: Fri, 25 Mar 2022 07:52:57 +0000
Message-ID: <17448-0a96583a67edb1f7@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17448
Logged by:          Okano Naoki
Email address:      okano.naoki@jp.fujitsu.com
PostgreSQL version: 14.2
Operating system:   Windows
Description:        

With huge_pages = on, the postgres process does not appear to use large
pages.
I checked with VMMap if the large pages are used in the following
environment.
Environment
  PostgreSQL version: 14.2
  Operating system  : Windows 10 20H2

On this page (*) says that in Windows 10, version 1703 and later OS
versions,  
you must specify the FILE_MAP_LARGE_PAGES flag with the MapViewOfFile
function 
to map large pages.

I think it seems to be the cause that MapViewOfFile() in
src/backend/port/win32_shmem.c 
does not specify FILE_MAP_LARGE_PAGES flag.

(*) MapViewOfFileEx function
https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-mapviewoffileex

FILE_MAP_LARGE_PAGES
  Starting with Windows 10, version 1703, this flag specifies 
  that the view should be mapped using large page support. 
  The size of the view must be a multiple of the size of a large page 
  reported by the GetLargePageMinimum function, 
  and the file-mapping object must have been created using the
SEC_LARGE_PAGES option. 
  If you provide a non-null value for lpBaseAddress, 
  then the value must be a multiple of GetLargePageMinimum.



view thread (25+ messages)  latest in thread

Message-ID: <17448-0a96583a67edb1f7@postgresql.org>
Permalink:  ../17448-0a96583a67edb1f7@postgresql.org/
Also on:    postgresql.org/message-id/17448-0a96583a67edb1f7@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, okano.naoki@jp.fujitsu.com
  Subject: Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
  In-Reply-To: <17448-0a96583a67edb1f7@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox