FreeBSD UFS & fsync

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: FreeBSD UFS & fsync
Date: 2021-02-22 16:48:28
Message-ID: CAKoxK+5mb7X6+ojzufJQb_s-way4ntjtOG+bbMtifGrccirYGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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 is a 1% increase.
I'm trying to figure out why, and I suspect there is something related
to how UFS handles writes.

Any particular advice about tuning and parameters that can be
affecting the "no difference" with fsync turned off?

% sudo tunefs -p /dev/gpt/DATA
tunefs: POSIX.1e ACLs: (-a) disabled
tunefs: NFSv4 ACLs: (-N) disabled
tunefs: MAC multilabel: (-l) disabled
tunefs: soft updates: (-n) disabled
tunefs: soft update journaling: (-j) disabled
tunefs: gjournal: (-J) disabled
tunefs: trim: (-t) enabled
tunefs: maximum blocks per file in a cylinder group: (-e) 8192
tunefs: average file size: (-f) 16384
tunefs: average number of files in a directory: (-s) 64
tunefs: minimum percentage of free space: (-m) 8%
tunefs: space to hold for metadata blocks: (-k) 6408
tunefs: optimization preference: (-o) time
tunefs: volume label: (-L) DATA

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Thomas Munro 2021-02-22 21:37:29 Re: FreeBSD UFS & fsync
Previous Message Laurenz Albe 2021-02-19 13:29:03 Re: Autovacuum not functioning for large tables but it is working for few other small tables.