Re: Setting BLCKSZ 4kB

2018-01-27 Thread Tomas Vondra
On 01/27/2018 05:01 AM, Bruce Momjian wrote: > On Fri, Jan 26, 2018 at 11:53:33PM +0100, Tomas Vondra wrote: >> >> ... >> >> FWIW even if it's not save in general, it would be useful to >> understand what are the requirements to make it work. I mean, >> conditions that need to be met on various l

Re: Setting BLCKSZ 4kB

2018-01-26 Thread Bruce Momjian
On Fri, Jan 26, 2018 at 11:53:33PM +0100, Tomas Vondra wrote: > > > On 01/26/2018 02:56 PM, Bruce Momjian wrote: > > Yes, that is the hard part, making sure you have 4k granularity of > > write, and matching write alignment. pg_test_fsync and diskchecker.pl > > (which we mention in our docs) wil

Re: Setting BLCKSZ 4kB

2018-01-26 Thread Andres Freund
Hi, On 2018-01-27 00:28:07 +0100, Tomas Vondra wrote: > But does that make the internal page size relevant to the atomicity > question? For example, let's say we write 4kB on a drive with 2kB > internal pages, and the power goes out after writing the first 2kB of > data (so losing the second 2kB g

Re: Setting BLCKSZ 4kB

2018-01-26 Thread Tomas Vondra
On 01/27/2018 12:06 AM, Andres Freund wrote: > Hi, > > On 2018-01-26 23:53:33 +0100, Tomas Vondra wrote: >> But more importantly, I don't see why the size of the internal page >> would matter here at all? SSDs have non-volatile write cache (DRAM with >> battery), protecting all the internal writ

Re: Setting BLCKSZ 4kB

2018-01-26 Thread Andres Freund
Hi, On 2018-01-26 23:53:33 +0100, Tomas Vondra wrote: > But more importantly, I don't see why the size of the internal page > would matter here at all? SSDs have non-volatile write cache (DRAM with > battery), protecting all the internal writes to pages. If your SSD does > not do that correctly, i

Re: Setting BLCKSZ 4kB

2018-01-26 Thread Tomas Vondra
On 01/26/2018 02:56 PM, Bruce Momjian wrote: > On Wed, Jan 17, 2018 at 02:10:10PM +0100, Fabien COELHO wrote: >> >> Hello, >> >>> What are the cons of setting BLCKSZ as 4kB? When saw the results published >>> on [...]. >> >> There were other posts and publications which points to the same directi

Re: Setting BLCKSZ 4kB

2018-01-26 Thread Bruce Momjian
On Wed, Jan 17, 2018 at 02:10:10PM +0100, Fabien COELHO wrote: > > Hello, > > >What are the cons of setting BLCKSZ as 4kB? When saw the results published > >on [...]. > > There were other posts and publications which points to the same direction > consistently. > > This matches my deep belief i

Re: Setting BLCKSZ 4kB

2018-01-17 Thread Tomas Vondra
On 01/16/2018 11:17 AM, Giuseppe Broccolo wrote: > Hi Sanyam, > > Interesting topic! > > 2018-01-16 7:50 GMT+01:00 sanyam jain >: > > Hi, > > I am trying to solve WAL flooding due to FPWs. > > > What are the cons of setting BLCKSZ as 4kB? > > >

Re: Setting BLCKSZ 4kB

2018-01-17 Thread Fabien COELHO
Hello, What are the cons of setting BLCKSZ as 4kB? When saw the results published on [...]. There were other posts and publications which points to the same direction consistently. This matches my deep belief is that postgres default block size is a reasonable compromise for HDD, but is l

Re: Setting BLCKSZ 4kB

2018-01-16 Thread Giuseppe Broccolo
Hi Sanyam, Interesting topic! 2018-01-16 7:50 GMT+01:00 sanyam jain : > Hi, > > I am trying to solve WAL flooding due to FPWs. > > > What are the cons of setting BLCKSZ as 4kB? > > > When saw the results published on http://blog.coelho.net/ > database/2014/08/17/postgresql-page-size-for-SSD-2.ht

Setting BLCKSZ 4kB

2018-01-15 Thread sanyam jain
Hi, I am trying to solve WAL flooding due to FPWs. What are the cons of setting BLCKSZ as 4kB? When saw the results published on http://blog.coelho.net/database/2014/08/17/postgresql-page-size-for-SSD-2.html 4kB page is giving better performance in comparison to 8kB except when tested with