Re: [PATCH] Add support for choosing huge page size

2020-07-16 Thread Thomas Munro
On Mon, Jun 22, 2020 at 7:51 AM Odin Ugedal wrote: > Ahh, thanks. Looks like the Windows stuff isn't autogenerated, so > maybe this new patch works.. On second thoughts, it seemed like overkill to use configure just to detect whether macros are defined, so I dropped that and used plain old #if de

Re: [PATCH] Add support for choosing huge page size

2020-06-21 Thread Andres Freund
Hi, On 2020-06-18 16:00:49 +1200, Thomas Munro wrote: > Unfortunately I can't access the TLB miss counters on this system due > to virtualisation restrictions, and the systems where I can don't have > 1GB pages. According to cpuid(1) this system has a fairly typical > setup: > >cache and TLB

Re: [PATCH] Add support for choosing huge page size

2020-06-21 Thread Odin Ugedal
> Documentation syntax error "2MB" shows up as: Ops, sorry, should be fixed now. > The build is currently failing on Windows: Ahh, thanks. Looks like the Windows stuff isn't autogenerated, so maybe this new patch works.. > When using huge_pages=on, huge_page_size=1GB, but default shared_buffers

Re: [PATCH] Add support for choosing huge page size

2020-06-17 Thread Thomas Munro
Hi Odin, Documentation syntax error "2MB" shows up as: config.sgml:1605: parser error : Opening and ending tag mismatch: literal line 1602 and para ^ Please install the documentation tools https://www.postgresql.org/docs/devel/docguide-toolsets.html, rerun configure and "ma

Re: [PATCH] Add support for choosing huge page size

2020-06-10 Thread Odin Ugedal
Thanks again Thomas, > Oh, so maybe we need a configure test for them? And if you don't have > it, a runtime error if you try to set the page size to something other > than 0 (like we do for effective_io_concurrency if you don't have a > posix_fadvise() function). Ahh, yes, that sounds reasonabl

Re: [PATCH] Add support for choosing huge page size

2020-06-09 Thread Thomas Munro
On Wed, Jun 10, 2020 at 5:11 PM Thomas Munro wrote: > 3. Last time I checked, Solaris and illumos seemed to have the same > philosophy as FreeBSD and not give you explicit control; my info could > be out of date, and I have no clue beyond that. Ah, I was wrong about that one: memcntl(2) looks hi

Re: [PATCH] Add support for choosing huge page size

2020-06-09 Thread Thomas Munro
On Wed, Jun 10, 2020 at 2:24 AM Odin Ugedal wrote: > Attached v2 of patch, updated with the comments from Thomas (again, > thanks). I also changed the mmap flags to only set size if the > selected huge page size is not the default on (on linux). The support > for this functionality was added in Li

Re: [PATCH] Add support for choosing huge page size

2020-06-09 Thread Odin Ugedal
Hi, Thank you so much for the feedback David and Thomas! Attached v2 of patch, updated with the comments from Thomas (again, thanks). I also changed the mmap flags to only set size if the selected huge page size is not the default on (on linux). The support for this functionality was added in Lin

Re: [PATCH] Add support for choosing huge page size

2020-06-08 Thread Thomas Munro
On Tue, Jun 9, 2020 at 4:13 AM Odin Ugedal wrote: > This adds support for using non-default huge page sizes for shared > memory. This is achived via the new "huge_page_size" config entry. > The config value defaults to 0, meaning it will use the system default. > --- > > This would be very helpful