On Tue, Feb 11, 2014 at 12:20 AM, Marti Raudsepp <marti@juffo.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