Re: FreeBSD UFS & fsync

2021-03-15 Thread Luca Ferrari
On Fri, Mar 12, 2021 at 10:34 AM Thomas Munro wrote: > It looks like your system is performing very badly for some other > reason, so that synchronous I/O waits are only a small proportion of > the time, and thus fsync=off doesn't speed things up very much. I'd > look into profiling the system to

Re: FreeBSD UFS & fsync

2021-03-12 Thread Bruce Momjian
On Fri, Mar 12, 2021 at 10:33:29PM +1300, Thomas Munro wrote: > On Fri, Mar 12, 2021 at 10:09 PM Luca Ferrari wrote: > >fdatasync 16269.365 ops/sec 61 usecs/op > >fsync 8471.429 ops/sec 118 usecs/op > > > Non-sync'ed 8k

Re: FreeBSD UFS & fsync

2021-03-12 Thread Thomas Munro
On Fri, Mar 12, 2021 at 10:09 PM Luca Ferrari wrote: >fdatasync 16269.365 ops/sec 61 usecs/op >fsync 8471.429 ops/sec 118 usecs/op > Non-sync'ed 8kB writes: >write278484.510 ops/sec

Re: FreeBSD UFS & fsync

2021-03-12 Thread Luca Ferrari
On Thu, Mar 11, 2021 at 3:29 PM Bruce Momjian wrote: > > You should really be running pg_test_fsync for this kind of testing. > Sorry Bruce, but it is not clear to me: pg_test_fsync compares different fsync implementations, but not the fsync on/off setting of a cluster. Now, pg_test_fsync report

Re: FreeBSD UFS & fsync

2021-03-11 Thread Bruce Momjian
On Tue, Feb 23, 2021 at 12:57:22PM +0100, Luca Ferrari wrote: > On Tue, Feb 23, 2021 at 8:46 AM Luca Ferrari wrote: > > I'm using sata disks, not scsi. Assuming I'm not looking at the wrong > > parameter, I wil attach a scsi disk to do the same test and see if > > something changes. > > I've test

Re: FreeBSD UFS & fsync

2021-02-23 Thread Luca Ferrari
On Tue, Feb 23, 2021 at 8:46 AM Luca Ferrari wrote: > I'm using sata disks, not scsi. Assuming I'm not looking at the wrong > parameter, I wil attach a scsi disk to do the same test and see if > something changes. I've tested the same version of PostgreSQL, same benchmark, on a scsi disk. However

Re: FreeBSD UFS & fsync

2021-02-22 Thread Luca Ferrari
On Mon, Feb 22, 2021 at 10:38 PM Thomas Munro wrote: > Do you have WCE enabled? In that case, modern Linux file systems > would do a synchronous SYNCHRONIZE CACHE for our WAL fdatasync(), but > FreeBSD UFS wouldn't as far as I know. It does know how to do that > (there's a BIO_FLUSH operation, a

Re: FreeBSD UFS & fsync

2021-02-22 Thread Thomas Munro
On Tue, Feb 23, 2021 at 5:49 AM Luca Ferrari wrote: > I'm running a virtual machine with FreeBSD 12.2, PostgreSQL 12.5 and > UFS as filesystem. > I was experimenting with fsync = off and pgbench, and I see no > particular difference in tps having fsync enabled or disabled. > Now, the same tiny tes

FreeBSD UFS & fsync

2021-02-22 Thread Luca Ferrari
Hi all, I'm running a virtual machine with FreeBSD 12.2, PostgreSQL 12.5 and UFS as filesystem. I was experimenting with fsync = off and pgbench, and I see no particular difference in tps having fsync enabled or disabled. Now, the same tiny test on a linux box provides a 10x tps, while on FreeBSD i