| From: | Marti Raudsepp <marti(at)juffo(dot)org> | 
|---|---|
| To: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: pg_test_fsync: "Invalid argument" in the middle of a test | 
| Date: | 2014-02-10 23:28:01 | 
| Message-ID: | CABRT9RDt5pbywoE5VO0oNhOdmriRuv3D2W=QeXrMjgrP7pMN0A@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Tue, Feb 11, 2014 at 12:20 AM, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
> This is on Ubuntu 13.10 (kernel 3.11) with XFS (mount ed with noatime,
> no other customizations).
I managed to track this down; XFS doesn't allow using O_DIRECT for
writes smaller than the filesystem's sector size (probably same on
other FSes). The XFS filesystem created by the Ubuntu installer uses
4kB sectors, for some weird reason:
# xfs_info /dev/sda1
meta-data=/dev/disk/by-uuid/987c0579-bd67-4f80-bbc6-50f975ee4c1d
isize=256    agcount=16, agsize=4341104 blks
         =                       sectsz=4096  attr=2
[...]
Yet the storage stack knows they're 512-byte sectors:
# cat /sys/block/sda/queue/logical_block_size
512
# cat /sys/block/sda/queue/physical_block_size
512
A new fresh filesystem also properly uses 512B sectors:
# mkfs.xfs /dev/sda5
meta-data=/dev/sda5              isize=256    agcount=4, agsize=489856 blks
         =                       sectsz=512   attr=2, projid32bit=0
[...]
I will be submitting a patch for pg_test_fsync so it can survive write
failures in this situation.
----
I could still use some help with this part... Does anyone have
experience in setting up megaraid_sas for reliable fsyncs?
>         open_datasync                    1575.148 ops/sec     635 usecs/op
>         fdatasync                        1460.741 ops/sec     685 usecs/op
>         fsync                            1362.300 ops/sec     734 usecs/op
>         fsync_writethrough                            n/a
>         open_sync                        1528.402 ops/sec     654 usecs/op
Regards,
Marti
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Wong | 2014-02-11 01:08:25 | Re: designing time dimension for star schema | 
| Previous Message | Marti Raudsepp | 2014-02-10 22:20:47 | pg_test_fsync: "Invalid argument" in the middle of a test |